[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Re: [zzdev] Re: gzigzag/src/util/test BenchPool.java
- To: "B. Fallenstein" <b.fallenstein@xxxxxx>
- Subject: Re: [zzdev] Re: gzigzag/src/util/test BenchPool.java
- From: Tuomas Lukka <lukka@xxxxxxxxxx>
- Date: Wed, 5 Sep 2001 14:27:07 +0300
- Cc: ZZ Development <zzdev@xxxxxxxxxx>
- In-reply-to: <3B93D904.DD1FE0EE@xxxxxx>; from b.fallenstein@xxxxxx on Mon, Sep 03, 2001 at 09:24:51PM +0200
- Mail-followup-to: "B. Fallenstein" <b.fallenstein@xxxxxx>, ZZ Development <zzdev@xxxxxxxxxx>
- References: <E15dmej-0003zA-00@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <3B9337DC.17EC1CBE@xxxxxx> <20010903143504.A29788@xxxxxxxxxxxxxx> <3B93D904.DD1FE0EE@xxxxxx>
On Mon, Sep 03, 2001 at 09:24:51PM +0200, B. Fallenstein wrote:
>
> 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
> !?!?!?)
It doesn't actually need to be that fast since it only needs to be done once
for each *factory* when setting up e.g. the text vob production line.
VobScene.getPool(java.lang.Class) ?
> Also, why remember the "previous length" of the blockpool in the
> caller, instead of always releasing everything in the pool?
That's not a problem - calling setSize(0) is fine. Having a parameter just makes
it more flexible at no cost.
Tuomas