openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <>
Subject Localizer.forPackage() and startup time
Date Thu, 09 Nov 2006 00:22:54 GMT

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 the
first load of any class that has a Localizer reference.

What do others think about this tradeoff?


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 individual
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.

View raw message