In fact, I just put the reference to JFreeChart as static. All the commons values are initialized in the static bloc (ie, Font, definition on the axis, ...).
I keep the image generation done in the getImageData using the pageParameters. So every session or even page request can have its own version on the graph. 2010/1/28 Pedro Santos <[email protected]> > Then this image will to be the same for all sessions. If you don't want > that > object on your session, make sure at getImageData method implementation > that > you are always creating your chart object, and not keeping it in any > instance variable. > > > On Thu, Jan 28, 2010 at 8:28 AM, Gaetan Zoritchak < > [email protected]> wrote: > > > Hi all, > > > > I was debugging my sessions size in order to reduce it and I saw that one > > of > > my page spend 20ko because of an dynamic image generated with JFreeChart. > > JFreeChart was serialized with my DynamicImageRessource. > > > > My first optimisation is to make JFreeChart a static field initialized in > a > > static bloc. > > > > Is it an valid way of handling that problem? > > > > Gaetan Zoritchak, > > > > > > -- > Pedro Henrique Oliveira dos Santos >
