stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <j...@apache.org>
Subject [jira] Updated: (STDCXX-907) messages<charT>::do_get() inefficiency requires unnecessary locking
Date Sat, 03 May 2008 01:06:55 GMT

     [ https://issues.apache.org/jira/browse/STDCXX-907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Travis Vitek updated STDCXX-907:
--------------------------------

    Attachment: stdcxx-907.patch

The proposed patch assumes that the patch for STDCXX-845 was applied. It should still work
without that patch, but I haven't tested it.

{noformat}
2008-05-02  Travis Vitek  <vitek@roguewave.com>

	STDCXX-845
	* src/messages.cpp (__rw_get_message): Add overload which takes a
	pointer reference, allowing us to get the message and the locale
	in a single function call to avoid some unnecessary locking.
	(__rw_get_message, __rw_get_locale) [_RWSTD_VER]: Conditionally
	deprecate old functions to be sure they are removed in 5.0
{noformat}

> messages<charT>::do_get() inefficiency requires unnecessary locking
> -------------------------------------------------------------------
>
>                 Key: STDCXX-907
>                 URL: https://issues.apache.org/jira/browse/STDCXX-907
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization
>    Affects Versions: 4.2.1
>            Reporter: Travis Vitek
>            Priority: Minor
>             Fix For: 4.3
>
>         Attachments: stdcxx-907.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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.

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


Mime
View raw message