I am developing a SAAS based java product using Spring 3 framework and using hibernate with annotations.
The site is very slow.I use ApacheTomcat server 6.0.26
Can someone tel me what Changes should I make ?
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It could be any number of reasons, though I doubt Apache has anything to do with it.
Possible reasons include:
First thing you should do is figure out how much time per page render is spent querying database, how much on application server. You should also record count how many queries are executed per render (and which ones). Then substract these 2 times from time to load the page on the client side and you get the third time which is time to output the page to the client and to render the page on the browser.
If the time spent in the database on a single query is large then use a database profiler to see where DB is performing long table scans and set up indexes there. If the query returns a lot of data but you are using just a bit of it, try writing a more specific query. If your spend a lot of time in DB because of the number of queries try to reduce the number of queries by caching or reusing data on application server.
If time spent of application server seems to be the problem you might need to rethink your algorithms and design choices.
If a lot of time is spent in the third part – transferring and rendering it on a client, try optimizing javascript, using expiration headers on your static content, CDNs, etc…
Download and install YSlow pluging and use it to test your page and follow its suggestions.