[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: gzigzag/src/util/test BenchPool.java



Tuomas Lukka wrote:
> > And it's views, after all, for which pooling is most useful (because
> > objects aren't kept for a long time). Or are there other important areas
> > of application?
> 
> Needs two blockpools. That's all.

No, unfortunately. Needs two blockpools per kind of object that can be
created in a view, and a way for some function to know whether to use
the first or the second pool. That interaction is actually quite hairy,
given that we do not have all the time in the world to determine it--
this MUST be fast. (Pass an additional parameter around everywhere
!?!?!?) Also, why remember the "previous length" of the blockpool in the
caller, instead of always releasing everything in the pool?

- Benja