I need to confirm a theory. I'm learning JSP/Java.
After looking at an existing application (I didn't write), I noticed something that I think is causing our performance problem. Or at least some of it.
It works like this:
1) user opens search page.
2) search page (by default) brings down ALL ROWS. 329,000 of them. Yes. 329K. Into an ArrayList. Each item in the ArrayList is a custom JavaBean tied to the DB table.
3) The ArrayList is then passed to a PaginateResultSet.
4) PaginateResultSet (prs) (329k rows) is then stored in a session variable: session.setAttribute("resultSet", prs);
5) Each additional "Next Page" then grabs 20 rows from the getAttribute("resultSet") and sends to Ext data grid.
OK, now, am I wrong in thinking that giant result set is stored in the SERVER's memory for each thread of each user? So if that result set takes up 20 megs of ram, and we have 20 concurrent users, we now have 400 megs taken from the server?
Isn't it a bad idea to pass THAT much data in session attributes?
Thanks for any pointers.