DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39310>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39310

           Summary: jasper should try to minimize the static content
                    included in class
           Product: Tomcat 5
           Version: 5.5.16
          Platform: Other
        OS/Version: Windows 3.1
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Because jsp are converted to servlet by jasper, and because, as i understood, 
jsp are not unloaded/reloaded unless they change, once a jsp has been 
accessed, it remain in tomcat memory as long as webapplication is running. If 
an applications has a lot of jsp with a lot of static content inside the jsps, 
this whole set of datas remain in memory while the dedicated place to store 
such data should be the system disk. If the server runs for enough time, you 
end up loading all your .jsp content inside java memory, uselessly consuming 
memory.

The memory consumption could be reduced by externalizing the static part of 
the jsp. If you look at a jasper generated jsp .java file, you see lots of 
lines like
out.print("this is some static content\n");

if jasper was to create a separate file storing all this static content, along 
with a caching system for performances, that would reduce a lot the memory 
footprint of some generated jsp. 

you could for example end up with a servlet having a code similar to this
String[] jsp_jasper_messages = acquireStaticText();
...
out.print(jsp_jasper_messages[53]);

this way, tomcat is not forced to use too much memory. the String[] could be 
loaded on demand from disc and unloaded when not used using a cache mecanism.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to