Solved

JSP, is it slow?

Posted on 2004-04-06
6
381 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
spring AOP 6 91
best tutorial on log4j and logging for servlets/jsp codes 1 65
doubleChar java challenge 7 129
maven j2ee examles 2 64
Facebook has became the #1 social media platform. People share many funny videos there, yet you don't know how to download them? Now you can download Videos from Facebook in just 3 simple steps.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 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