New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 882279 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

ICU 63 supports UCPTrie and vertical orientation property

Project Member Reported by kojii@chromium.org, Sep 10

Issue description

From Markus, ICU 63 will support UCPTrie and Vertical_Orientation property.

We can move our UTrie impl to this when ICU 63 is available.
 
What's the difference between UCPTrie and UTrie? Do you mean that we can move 
https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/text/character.cc?type=cs&q=UTrie+blink&sq=package:chromium&g=0&l=105 to querying ICU instead?

UTrie requires building ICU with Blink/Chromium, while UCPTrie doesn't. For that reason, we have two code paths; one to use UTrie for our normal usage, and another to use UnicodeSet for when USING_SYSTEM_ICU.

Yes, the plan is to move our code that uses UTrie to UCPTrie, which gives us:
* The single code path with USING_SYSTEM_ICU and without.
* USING_SYSTEM_ICU can get the same performance as built-in ICU build.
* U(|CP)Trie can query uint while UnicodeSet can only query a bool. Because of two code paths, we limit its use only for a bool. With the code paths unified, we can query multi-bit properties.

I was waiting for ICU 63 to be deployed and forgotten, but found it's already in our repo, so we can start the transition now. Thanks for the reminder.
I see that character.cc is using UTrie2 for lookup of some property values. UTrie2 is internal to ICU. The UCPTrie/CodePointTrie is the first *public* ICU API for this purpose. I spent some time simplifying the trie structure and adding some features (e.g., option for uint8_t values), and we had a lively discussion about what would be a reasonable API. (This is my third round of a general-purpose trie. UTrie2 was, well, the second one. See http://site.icu-project.org/design/struct/utrie)

Sign in to add a comment