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

Inefficiency when retrieving strings from message catalog

Add voteWatch issue
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.2.1
    • 4.3.0
    • 22. Localization
    • None
    • Patch Available
    • 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

            Unassigned Unassigned
            vitek Travis Vitek

            Dates

              Created:
              Updated:

              Time Tracking

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

                Slack

                  Issue deployment