Sounds reasonable.  Just keep tabs on the trade-off between optimization and 
added complexity.  Creating new objects is not that expensive in the grand 
scheme of things.

----- "Robert Burrell Donkin" <[email protected]> wrote:

> On Tue, Sep 8, 2009 at 6:59 PM, Boris Burtin <[email protected]>
> wrote:
> > Yeah, that's a good idea.  It would be good to clarify the jSieve
> framework behavior.  I assumed that a new instance of my test gets
> created every time that a script is evaluated, but maybe that's not
> the case.
> 
> at the moment, AIUI the answer is yes. it would probably be more
> efficient to avoid creating all those instances but they would then
> need to be safe for concurrent reuse.
> 
> i been thinking about moving towards a factory model so that more
> advanced features can be supported. in this case it's probably nature
> to place the responsibility on the factory to manage instance reuse.
> in this case, a natural contract would be for the engine to call for
> an instance once per evaluation.
> 
> opinions?
> 
> - robert
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to