Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Messages which get "bundles" currently look up the bundle resource using Java's mechanisms, and a special class loader. The Java mechanisms look up the bundles in multiple bundle names - using suffixes for locales. The special class loader does 3 kinds of searching (if not found in the current class loader): 1) for UIMA Resources, it uses a resource-specific classpath (see UIMA-3692, UIMA-4793 ), and the thread local (if one is present) and then it looks up the call stack and uses any found class loader associated with the call stack frames. This can be quite expensive.
Update the localizeMessage in I18nUtil to cache the resource bundle (by thread), and avoid this lookup for every message.
When a lookup is done, change the order of the special class loader to move the look-up-the-call-stack to follow the other two (using the Resource-specified classloader, using the threadLocal classloader).