Huge form == huge memory usage, application dying
843844Apr 27 2007 — edited May 2 2007I have big memory problems:
I have an application that runs fairly well at the moment when allocated 1.5GB RAM but that I need to make it ALOT more memory efficient. The actual data I need to work with doesn't take up much space, but I have to work with some huge forms and all of the processing JSF is doing when I submit it causes all the memory (I'm testing with 768MB) to be eaten up and the application hangs, unable to finish the page request/rendering.
If I do average tasks with the application alot of short-lived objects are created whenever I submit a form / request a new page, but most of it is soon collected. (another issue is that alot of JSP classes get tenured and never used and they take up a fair amount of space until a full collection occurs). However, when I try to get it to do the most strenous possible task - the submission of a form with about 1219 input components - it doesn't have enough memory, the garbage collection doesn't free up enough space and it dies (just stops processing).
The stupid thing is that 600 of the input components are hidden and I really don't need (or want) them to be submitted, but I can't think of a way to stop them submiting. I think if I could find a way to either get rid of them (but still have their data somewhere for my Javascript methods) or stop them submitting it would free up alot of memory. Does anyone have any ideas about what I can do to cut down on my memory usage? Do converters use up a huge amount of memory? Any advice or ideas would be appreciated!