Solved

JSP, is it slow?

Posted on 2004-04-06
6
380 Views
Last Modified: 2010-04-01
I have an application that is currently developed as an MS Access project connected to an MS SQL Server.  My intention is to redevlop this as a web based application and I thought I'd give JSP a go.  I've set up a Tomcat 5.0 development server and made a couple of test pages to see how it feels.  I'm using the Microsoft SQL server driver for JDBC to connect to my database to run a couple of simple to queries and iterate through a recordset to display the results.  I like to use stored procedures rather than sending SQL strings to the server so I'm using a CallableStatement and defining the parameters for it.

The problem is it seems to be running very slowly, regardless of the complexity of the query or the size of the returned recordset.  Is this a general problem with JSP?  Would it be faster if I ran the code in a servlet rather than in the .jsp page?

My application currently makes lots of calls to the SQL server for things like drop boxes, list boxes and so I'm a little ancious about this apparent lack of speed.  Would you recomend I stick to JSP or would PHP or ASP be a better option.

Any tips on the performance of jsp with SQL server(or even other DBMSs) and recomendations on other platforms would be much appreciated.

Thanks,

Tom
0
Comment
Question by:TommyV10
  • 3
6 Comments
 
LVL 6

Accepted Solution

by:
jarasa earned 250 total points
ID: 10767307
Hi.

I can't believe you say that your application in MS-Access goes faster that JSP or ASP, it could be if you are getting all the data and show it all on your window. but you must consider that that's not the way it suppose to work a web application, you're supposed to pick data in little pieces over the web and that why is supposed to be faster.

About the use of PHP or ASP it won't make much difference with ASP you could probably get a faster development since you already come from Mircrosoft way of programing but it won't be easy to put that software on othere plataform.

With the Prepared Statements, well the DB is the one that makes all the effort so the time to bring the data to the web server will depend on the amount of row you pass, youhave to consider pagging the recorsets etc.

I believe is a big change to pass from a Client\Server environment to a Web one you must change your point of view of all the THING but let me tell you you won't be dissapointed. Think about an J2EE Application with and EJB architechture and connection pool to your DB.

Java is Wonderfull it's worth all the time you give to it, but is not easy to make high performance to many thing to consider. On the Servlet question just notice that JSP is compilled into a servlet so it won't make much difference at the end, just the compilation time but that's the first time you call it.

Have Fun and Enjoy

Javier
0
 
LVL 6

Expert Comment

by:jarasa
ID: 10767377
About the tips for performance, well I guess there are too many, think about using application scope to save the drop down boxes data in session so all the users can acces them. Most of them pass to use the users session to store the most useful data.

Javier
0
 
LVL 27

Expert Comment

by:rrz
ID: 10767442
>made a couple of test pages to see how it feels.    
Please show us one.
0
 
LVL 1

Author Comment

by:TommyV10
ID: 11047644
Sorry, I forgot about this one.

Thank you jarasa for you tips and comments.  I have taken your advice and am now looking at developing under a J2EE environment.  It is a big step, but so far you are right, I'm not dissapointed.
0
 
LVL 6

Expert Comment

by:jarasa
ID: 11047667
I'm glad to hear that tommy. and thanks for the Points.

:c))

Javier

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
netstat -a in AIX unix 8 48
java beans and EJBs 5 196
reflection example 3 110
collection output issue 9 36
IT certifications are a concrete representation of continual learning on the part of the candidate.  Continual learning is necessary for the long term success of an IT professional, but are IT certifications the right path for you?
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question