Solved

JSP, is it slow?

Posted on 2004-04-06
6
374 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now