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

messages<charT>::do_get() inefficiency requires unnecessary locking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.2.1
    • 4.3.0
    • 22. Localization
    • None
    • Patch Available
    • Inefficiency

    Description

      The _STD::messages<T>::do_get() method might actually call __rw_manage_cat_data() up to three times to access the cache. Since each access involves a mutex lock, there are going to be some wasted cycles. It would be nice to reduce this to one access. Perhaps the _RW::__rw_get_message() function could be changed to fill in a pointer to the _STD::locale that is kept in the cache and the _RW::__rw_get_locale() function could be removed.

      For backward binary compatibility we would need to keep the existing functions around, but we could add an overload and then deprecate the old ones using the _RWSTD_VER macro.

      Attachments

        1. stdcxx-907.patch
          3 kB
          Travis Vitek

        Activity

          People

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

            Dates

              Created:
              Updated:

              Time Tracking

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