On 12/19/05, Remy Maucherat <[EMAIL PROTECTED]> wrote:
> Costin Manolache wrote:
> > One of the problems is that jasper is a tricky piece of code, and
> > usually reducing memory this way can have unexpected impact. Maybe a
> > more 'moderate' approach would be more acceptable, like checking the
> > size of the buffers, and only reset it if it is indeed 'huge'. This
> > would take care of the worse case, yet still allow keeping the buffers
> > around for normal use.
>
> I think I will do the following changes:
> - Use a system property to initialize USE_POOL

> - maybe switch to using a thread local rather than the current pool (now
> that the thread count is supposed to correspond to actual concurrency),
> which I don't like

That's a good one - of course the thread count == concurrency only for
APR/nio type connectors afaik, it's still not true for regular
connector.


> - as for "like checking the size of the buffers, and only reset it if it
> is indeed 'huge'. This would take care of the worse case", performance
> of tags using this would really suck since allocating char arrays and
> System.arraycopying many many times will be needed for every tag
> invocation (the API design is to be blamed, I guess); I suppose I can
> add another system property flag to allow using the crap-performance-mode

Assuming that most of the pages use 'huge' buffers - you're right.

However, if you have few pages that need large buffers - and most
don't - this will help.
And you would pay the price of System.arraycopy on the bad pages - i.e. normal
pages will be faster, and jsps that abuse the buffer will be even
slower than before. I think it's a good tradeoff, having bad
performance for pages that abuse the tag buffers is a given anyway :-)

Costin




>
> Rémy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to