Daniel Fagerstrom schrieb:
I don't find any reasons for that they should be larger in the blocks
case. Again profiling would give some clues.
One possibility is that there is some fault in the component handling so
that the block servlet component or tree processor is recreated instead
of reused in some cases.
I have done some profiling with JProfiler. First of all there is no
obvious leak (due to the massive amount of reflection that happens
inside the sitemap). The heap simply grows and grows even with simple
page requests without much dynamics like forms. The garbage collection
does not free much, so you have a linear growth up to something like 70
MB, when the maximum is reached and an error is thrown.
But from what I have seen, I suppose that the BufferedOutputStream of
resources (css, images, javascript), which we handle via a
ResourceReader that calls a super block, which contains all the
resources, are not properly closed or removed. That stream holds all the
data in a byte array. Can it be that nobody actually closes or clears
the OutputStream that is present when the ResourceReader gets a
BlockSource as input?
I.e. the call looks like: URL -> DispatcherServlet -> BlockServlet ->
sitemap.SitemapServlet -> internal processing -> ResourceReader ->
BlockServlet -> SitemapServlet reading the resource from a file.
Alex
--
Alexander Klimetschek
http://www.mindquarry.com