Big red premature optimization flag for me. The rules for embedded
programming are probably different, but the reuse of many short lived
objects is something modern JVMs are specialized in; it's probably
more efficient to let hotspot handle that.

>From http://java.sun.com/docs/hotspot/PerformanceFAQ.html:

'Many systems have less efficient memory management than in HotSpot.
To work around this, some programs keep an "object pool", saving
previously allocated objects in some freelist-like data structure and
reusing them instead of allocating new ones. But... Don't use object
pools! Using object pools will fool the collector into thinking
objects are live when they really aren't. This may have worked before
exact garbage collection became popular (in the 1.x systems), but this
is just not a good idea for any modern Java Virtual Machines.'

and

'Should I pool objects to help GC? Should I call System.gc()
periodically? Should I warm up my loops first so that Hotspot will
compile them?

The answer to all of these is No!

Pooling objects will cause them to live longer than necessary. The
garbage collection methods will be much more efficient if you let it
do the memory management. We strongly advise taking out object pools.
'


Eelco


On 6/26/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> We  could try it. IT is not the BufferedResponse itself but the char[]
> inside the AppendingStringBuffer that it has.
> So maybe we could pool those somehow if it really makes a difference.
>
> But to much pooling is also not a good idea i think.
>
> johan
>
>
>
> On 6/26/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> >
> > has the creation of the buffered web response objects show up as a hotspot
> in the profiler?
> >
> >
> > -Igor
> >
> >
> >
> >
> > On 6/26/06, Marco Geier < [EMAIL PROTECTED]> wrote:
> > > When using "Buffered Rendering", there seems to be a BufferedWebResponse
> > > created for every Request/Response.
> > > It should be beneficial for performance if we had a pool of
> > > BufferedWebRespones for object reuse.
> > > I will try to implement and test this with the stock wicket 1.2,
> > > (although i for sure will have to deal with a lot of "final"s :-( )
> > >
> > > Anyway, for a future wicket release maybe you could provide a hook for
> > > customizing or plugging some pooling here.
> > >
> > >
> > > Rgds,
> > >
> > > Marco
> > >
> > >
> > >
> > >
> > > Using Tomcat but need to do more? Need to support web services,
> security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > _______________________________________________
> > > Wicket-develop mailing list
> > > Wicket-develop@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > >
> >
> >
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >
> >
> > _______________________________________________
> > Wicket-develop mailing list
> > Wicket-develop@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
> >
> >
>
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> _______________________________________________
> Wicket-develop mailing list
> Wicket-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>
>
>

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to