Hi I'm not sure is it right forum im posting to... (anyway moderators will move it to correct one )
Question is folowing:
In my action class I put in a request an List object (which represents our web app reports) which I iterate later on jsp page... then on this jsp page I have a button "Print" which opens in a new window same "print friendly" data. Since DB is growing some of reports queries take about 5-10 min. So when user first time load a report data he waits for 5 min, and then when he wants to print it he again have to wait... Not really nice huh? I thought to put this object in a session, but number of reports growing, and if user will run all of them... Any suggestions... Thx in advance..
What you need is a cache that you can store those complete reports to (and which drops the oldest or most rarely accessed reports when running out of space). I'm not aware of any particular object cache I could recommend but I'm sure there are such libraries freely available. On the other hand, you might also consider using a caching layer on top of your JDBC code and see if that would improve the performance enough.
Hi Thx for reply Actually I was thinking about "object cache" and I was suspecting some recomendations on it
And what about JDBC top layer cache, can you tell a little bit more on this please?
Joined: Jan 23, 2002
Originally posted by Ilja Smoli: And what about JDBC top layer cache, can you tell a little bit more on this please?
Well, if you would be using Hibernate for persisting your objects into the database, you'd get caching for free and you'd even get to choose from a number of caching implementations to choose from, ranging from JBoss-Cache to EHCache to OSCache to SwarmCache (and I probably forgot one or two, still).
If this isn't an option and/or doesn't help your application's performance, then I'd strongly suggest you look into caching the full reports themselves using an in-memory object cache such as ShiftOne/JOCache, WhirlyCache or Jakarta Commons Cache, or a disk-based cache where you store the complete reports ready for the next user.