Solved

JSP, is it slow?

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet concurrency 13 102
difference between projection and projection list in hibernate 1 110
jsp login check 12 32
jsp insert to database example 2 24
Google always has something new and amazing up its sleeve, and the most current thing that they have been working on is another step in the evolution of Google Search, from machine learning to its brilliant successor, deep learning.
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 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