Nathan Bubna wrote:

> Gabe,
> 
> why the all the changes to DateTool and ParameterParser?  i'm not opposed to
> improving them, but your changes break my current usage of them and makes
> them more difficult to use (IMO).   In DateTool, I don't like having to get
> the locale and pass it to methods every time i want locale sensitive
> behaviour.  it is much easier to set the locale once per instance and have
> it from there.  what was your reason for changing that?
> as for the ParameterParser, a similar problem now exists.  instead of having
> one instance per request, i must now pass the request for every method!
> why??  i can't imagine a case where you can correctly be using the same
> instance for multiple requests!  IMO that is really wrong behaviour and
> seems to be encouraged by your changes.  i really don't get it and am not at
> all eager to change my usage to fit these changes.  am i just completely
> missing something?  please explain.
> 
> Nathan Bubna
> [EMAIL PROTECTED]


Nathan,
my motivation was to make the tools thread-safe and thereby allowing
the reuse of the same instance for the entire runtime. The additional
method parameter for some of the methods seemed to be a reasonable
trade-off to me.

Since we are discussing this in the context of auto-loading context
tools, performance is a real concern of mine. Every context tool class
that is not thread-safe must be instantantiated on every template
request. We are talking about hundreds of instances a second.
I agree that your versions of the tools are a little more user-
friendly. I would use them in a non-auto-loading environment. Maybe
we should keep them in the library with a note that they are more
user-friendly but not thread-safe.


Gabe


--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to