Minimize memory usage of large javabeans

Hello,

Can I get some suggestions as to minimizing the memory usage of javabeans containing large amount of data?

I'm developing an application in which multiple session-scoped javabeans could store many rows of records retrieved from a data source. Unfortunately the data retrieved is not sorted or filtered in any way, I have to manipulate the data based on user choice myself. Worse yet, the access time to the data source could be up to 5 seconds. So retrieving data on demand is almost prohibited except for the very first time.

My question is, after getting the data and saving them to a bean, what would be the best way to preserve the data without consuming much system memory when the user goes to a different page where a different bean (of similar scenario) is invoked? Note that the users may go back and forth among these pages. I'm simply trying to balance performance and system resources while providing a decent user experience.

Is serialized javabean the answer? I'm still not clear about memory consumption and the life span of the serialized files.

Any advice would be appreciated.

[1141 byte] By [liroger] at [2007-9-27 16:45:44]
# 1
HeyHave you tried Borland Optimize IT which is a tool that lets you know where you are increasing the memory usage of your java code, it also allows you to optimize your code so as to increase its performance. Its available from Borland, Hope this helpsSwaraj
kswaraj at 2007-7-6 1:03:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...