[Webkit-unassigned] [Bug 162001] New: TextBreakIterator: unconvolute character break cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 14 17:11:58 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=162001

            Bug ID: 162001
           Summary: TextBreakIterator: unconvolute character break cache
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jfbastien at apple.com

TextBreakIterator's character break cache is weird.

Added here (fixed a bit after): https://bugs.webkit.org/attachment.cgi?id=144118&action=prettypatch
Updated to never use a lock, and always use weak cmpxchg here: https://bugs.webkit.org/attachment.cgi?id=261719&action=prettypatch

It's just trying to reduce the number of times it calls into ICU to initialize a UBRK_CHARACTER. The implementation keeps a one-element cache of the latest used one, which threads can optimistically grab. Failure is fine (just create a new one), same for failure to cache (just destroy it), but the logic is odd and you technically need release / acquire semantics because the UBRK_CHARACTER creation's store need to be visible on acquisition (but realistically it was created and then used and *then* cached, so it's probably been long ago enough that read reorders never manifested).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160915/f70495bb/attachment.html>


More information about the webkit-unassigned mailing list