struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: LocalizedTextUtil mods
Date Thu, 06 Mar 2014 12:43:21 GMT
What's the actual speedup?

It might be nice if it was configurable; I'm not sure what the stats would
be regarding how many apps use S2 vs. "regular" localization.

Dave



On Thu, Mar 6, 2014 at 7:38 AM, Greg Huber <gregh3269@gmail.com> wrote:

> Seeing this mod the other day has reminded me that I do a local change on
> LocalizedTextUtil to speed up the screens.
>
> What I do is to add a check to see if the property comes from the
> getDefaultMessage(..) method (ie from ApplicationResources.properties) and
> if it does skip all the checking that it does (for every request).  If you
> have a lot of inheritance or <s:text> and do not use properties / class
> name strategy it makes the rendering a whole lot faster.
>
> ie
>
> HashSet<String> set = defaultLocationMap.get(locale.toString());
> if(set != null && set.contains(aTextName)){
> ...
> }
>
> Would this be acceptable here?
>
> Cheers Greg
>



-- 
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message