portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Kimpton <kimptoc_m...@yahoo.com>
Subject Re: Portlet Caching problem
Date Tue, 02 Apr 2002 11:27:23 GMT
Hi,

--- Santiago Gala <sgala@hisitech.com> wrote:
> Glenn Golden wrote:
> 
> (...snip...) See comments by Raphael below
> 
> >
> >Also noticed that the PortletWrapper objects are not cached, and
> are being
> >created and used once and thrown away for each wrapped portlet. 
> Messy.
> >
> The PortletWrappers are quite lightweight objects, which do not
> need a 
> costly initialization.
> 

...but initialization is not that costly these days... at least
compared to the standard Stack implementation.

I attach a simple comparison of creation and using a Stack based pool
and an array based pool - very crude - but should be sufficient to
highlight the point.

It gives these results:

Test1 started
Time1 per 1000.0 new's 0.25 ms
Time3 per 1000.0 pool lookup's 0.701 ms
Time4 per 1000.0 array pool lookup's 0.08 ms

[NT/Sun jdk1.3.1_02/400mhz/384MB ram]

So - if you implement your own array based pool, it might be quicker
than creation - but you need to be careful.

Chris

=====
------------------------------------------
http://www.soccer2002.org.uk

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/
Mime
View raw message