+1   Defer paying the price until it is needed.  Thanks for looking into

On 11/9/06, Bryan Noll <[EMAIL PROTECTED]> wrote:

+1.  Seems right to have the 'slowness' occur on the unhappy path
instead of the happy path.

Craig L Russell wrote:
> +1
> Seems like the right tradeoff.
> Craig
> On Nov 8, 2006, at 4:22 PM, Patrick Linskey wrote:
>> Hi,
>> I'm investigating ways to optimize startup time a bit, and one thing
>> that I ran across is resource bundle overhead in calls to
>> Localizer.forPackage() calls. I'm working on a patch that defers all of
>> the Localizer.forPackage() overhead to the first use of the localizer,
>> instead of eagerly looking for data.
>> This will mean slightly more overhead on all Localizer method
>> invocations, but localization generally only happens when writing log /
>> error messages, so it seems like it's fair to increase the overhead in
>> those situations in exchange for eliminating the overhead in normal
>> usage (i.e., when the localizer is not used).
>> Since we obtain Localizer instances statically, this should speed up
>> first load of any class that has a Localizer reference.
>> What do others think about this tradeoff?
>> -Patrick
>> --Patrick Linskey
>> BEA Systems, Inc.
>> _______________________________________________________________________
>> Notice:  This email message, together with any attachments, may contain
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
>> entities,  that may be confidential,  proprietary,  copyrighted  and/or
>> legally privileged, and is intended solely for the use of the
>> or entity named in this message. If you are not the intended recipient,
>> and have received this message in error, please immediately return this
>> by email and then delete it.
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:[EMAIL PROTECTED]
> P.S. A good JDO? O, Gasp!

Reply via email to