Maybe this functionality was needed to allow user to override higher
layers defined values (?) Or maybe another user for any reason claim
that current behavior is wanted.

So generally I think we can have a Map as a cache, if not found in cache
then searching and if found after search, saving in cache. I've seen
this mechanism in Struts in other places as well.

Regards.


On 9/14/2020 1:13 PM, Greg Huber wrote:
> I have a local modification that I do to speed up my app on how I get
> screen text ie <s:text name="screen.title" /> via
> com.opensymphony.xwork2.util.StrutsLocalizedTextProvider.
> 
> By default StrutsLocalizedTextProvider will scan the class packages
> first for the message and then if it cannot find it try
> ApplicationResources.properties.
> 
> I use the ApplicationResources.properties for my screen messages and
> then scatter the validation stuff/messages in the packages/classes.  I
> seem to now have alot of packages for my struts classes, so has resulted
> in a lot of scanning for nothing.
> 
> Also, maybe only having one ApplicationResources.properties is/was not
> good practice, but makes it easy to manage my screen text, rather than
> duplicating them in many locations.  I think the system does try to do
> some location caching, but it is still slow in comparison.
> 
> It is a minor code change, ie scans ApplicationResources.properties
> first, then scans the packages.  I could do a PR to check it out. wdyt?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
> For additional commands, e-mail: dev-h...@struts.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to