Subject | Re: [Firebird-Java] Re: Should (Could) FBStatements be held in WeakHashMap |
---|---|
Author | Mark O'Donohue |
Post date | 2003-06-14T16:21:30Z |
Robert DiFalco wrote:
time/memory critial region of operation.
The main extra resourse used is a weak reference object per Statement
object. So it's not like it was every string operation for instance.
fairly close to as cost efficient as the original, checking a debug flag
would likely consume more cpu time than was added to the routine.
Cheers
Mark
> I just wanted to state my concern for adding memory and processorThe overhead is very trivial and the usage is not in a heavily
> overhead to benefit those whose code is in error. After all, closing a
> statement is a requirement, not just "a good thing to do". I'm not crazy
> about having to pay with the maintenance of Weak References, Reference
> Queues, and casts for those whose code is in error.
>
time/memory critial region of operation.
The main extra resourse used is a weak reference object per Statement
object. So it's not like it was every string operation for instance.
> If this is an issue (and I'm not sure why it should be), I would preferSure it's worth checking, but the implemntation is fairly simple, and
> to have a DEBUG mode that tracks statements and their resource
> consumption. By turning this flag on I could tell that I'm am not
> properly closing resources without imposing a hit on those who are using
> resources properly.
>
fairly close to as cost efficient as the original, checking a debug flag
would likely consume more cpu time than was added to the routine.
Cheers
Mark