[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #8842(accepted tools)

Opened 2 years ago

Last modified 7 months ago

Optimize Coverage

Reported by: mark Owned by: emmons
Component: supplemental Data Locale:
Phase: rc Review:
Weeks: Data Xpath:
Xref:

Description

We could optimize Coverage as follows.

Phase 1.

  1. The coverage paths are already in a format like:

numbers/currencies/currency[@type='%currency60_EU']/symbol[@alt='(narrow|variant)']"

Modify these paths always use variables, so:

numbers/currencies/currency[@type='%currency60_EU']/symbol[@alt='%narrowVariant']"

And make sure that variables are only used in attribute values.

  1. Restructure the code reading coverageLevels.xml so that puts each of the paths into a bucket based on the "starred-path" (that is where each attribute value is replaced by *). Each bucket will have a small number of elements in it, typically 1-3.
  1. When testing coverage,
    1. first transform the path into a starred path. (that's very fast).
    2. find the right bucket (that's a hash-lookup, also very fast)
    3. search with a regex lookup within the bucket (because there are now only a few elements, it is way faster than current.

Phase 2.

If desired, we can make use of the overlap between coverage levels and AttributeValueValidity. The attribute value validity also has more extensive variable mechanism that makes it easy to have code-produced variables, and also to have lookups be in hash sets instead of serial regex matches.

  1. Put all the static coverage variables in coverage into attributeValueValidity.xml (share the ones in there already).
  1. Move the code-based coverage tests into AttributeValueValidity code.

Attachments

Change History

comment:1 Changed 2 years ago by emmons

  • Status changed from new to accepted
  • Component changed from unknown to supplemental
  • Priority changed from assess to medium
  • Phase changed from dsub to rc
  • Milestone changed from UNSCH to 29
  • Owner changed from anybody to emmons
  • Type changed from unknown to tools

comment:2 Changed 2 years ago by emmons

  • Milestone changed from 29 to upcoming

comment:3 Changed 7 months ago by emmons

  • Milestone changed from upcoming to UNSCH
View

Add a comment

Modify Ticket

Action
as accepted
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.