+ Start a Discussion
zspacekcczspacekcc 

Hold data over page loads?

Hi,

 

I'm not sure if this is even possible, but I thought I would try:

I've got a large system that I'm working on. Each page in this system requires a large amount of data to be pulled and orginized before they can be used (this data is unique to each user and is critical to the functionality).

The way I have it working currently is each page load calles a static method that setups up all this data in the constructor for each page (there are about a dozen custom pages that use this). This makes the entire system slow because each page change/reload requires the data to be reprocessed.

What I would like to do if at all possible, is to hang on to this processed data between page changes. I know this cannot be done by keeping it in the memory, but is there any way that I can store most or all of the data someplace so that I can recall it without having to perform the data processing all over again?

NikuNiku

I think you can improve the functonality in the following ways

1. The variables witch are not used in the DML operation make then transiaent if possible.

2. You have created a Static Function that is good. you can create one Map who can hold the information as value and UserId as key.

3. So if the information for the resoective user is in the Map do not need to fire query .. just pull the value from your MAP.

4. Write all your logic in the action method if possible. Because whenever you are puting your logic in the constructor it will take time for Class member Initialisation as well as data prossesing that you are going to achive.

 

 

 Thanks

Nik's