Inefficiency when retrieving strings from message catalog
---------------------------------------------------------

                 Key: STDCXX-943
                 URL: https://issues.apache.org/jira/browse/STDCXX-943
             Project: C++ Standard Library
          Issue Type: Improvement
          Components: 22. Localization
    Affects Versions: 4.2.1
            Reporter: Travis Vitek
            Priority: Minor
             Fix For: 4.3
         Attachments: stdcxx-943.patch

A single call to {{\_STD::messages<T>::do_get()}} can call 
{{\_\_rw_manage_cat_data()}} up to three times. Since each call involves a 
mutex lock/unlock, there are going to be some wasted cycles. It would be nice 
to reduce this to one call. Perhaps the {{_RW::\_\_rw_get_message()}} function 
could be changed to fill in a pointer to the {{\_STD::\_\_rw_locale}} that is 
kept in the cache and the {{_RW::\_\_rw_get_locale()}} function could be 
removed.

For binary compatibility reasons, we may need to add an overload of 
{{_RW::\_\_rw_get_message}} and deprecate the other functions so that they are 
removed automagically in the next major release.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to