Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-943

Inefficiency when retrieving strings from message catalog

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.2.1
    • Fix Version/s: 4.3.0
    • Component/s: 22. Localization
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Severity:
      Inefficiency

      Description

      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.

        Attachments

        1. stdcxx-943.patch
          3 kB
          Travis Vitek

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vitek Travis Vitek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h