how to improve jsp load time?
843835May 30 2003 — edited Jun 2 2003Hi everyone --
Got a question for all of you.
I have a form in a JSP, which does a (Oracle 9i) db lookup on 13 fields and populates the drop-down boxes. The load time for the JSP is slooooww.
These are my options for speeding up the load time (I think):
1. When the web/app server starts the application, have it do all the db lookups and store the resultsets...somewhere. Maybe have some dblistener thread that periodically checks for updates to the db. Then, when someone actually requests the JSP, all the JSP has to do is read the pre-populated drop-down boxes and load.
2. Wait until someone requests the JSP and store all the resultsets as cookies for the session. The resultsets will be good for the home JSP and its sister. This doesn't really solve the problem, since the initial load will still be slow.
3. Combine all the lookup statements into one huge statement, and store the results somewhere. This method queries the db only once, and the drop-down boxes can be populated from one query (instead of 13 separate connections and queries).
All of these ideas seem mediocre to me, and they don't address the fact that the results of the queries change contantly. What I need is a
way to make the JSP load quickly and with the most current information.
Does anyone have any ideas? Which of my suggestions is rather boneheaded?
Thanks for any advice,
-Kwj