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

CLDR Ticket #8753(accepted tools)

Opened 2 years ago

Last modified 21 months ago

VoteResolver hotspot!

Reported by: srl Owned by: srl
Component: survey Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:
Xref:

Description (last modified by srl) (diff)

*every instance* of VoteResolver initializes this code. Very expensive.

    private SupplementalDataInfo supplementalDataInfo = SupplementalDataInfo.getInstance();

    private final Comparator<T> ucaCollator = new Comparator<T>() {
        Collator col = Collator.getInstance(ULocale.ENGLISH);

        public int compare(T o1, T o2) {
            return col.compare(String.valueOf(o1), String.valueOf(o2));
        }
    };

Lots of problems here:

  1. the SDI should be calculated just once. It's a hash lookup.
  2. the English collator should be frozen and cached statically.
  3. the UCA collator should be frozen and cached statically.
  4. Surely we use collators as a comparator elsewhere. Should be common code.
  5. Yoshito pointed out that Collator is-a Comparator.
  6. "English" ≠ "UCA"

Attachments

Change History

comment:1 Changed 2 years ago by emmons

  • Status changed from new to accepted
  • Priority changed from assess to critical
  • Phase changed from dsub to rc
  • Milestone changed from UNSCH to 28
  • Owner changed from anybody to srl
  • Type changed from unknown to tools

comment:2 Changed 2 years ago by srl

  • Description modified (diff)

comment:3 Changed 2 years ago by srl

  • Owner srl deleted
  • Status changed from accepted to new

comment:4 Changed 2 years ago by emmons

  • Owner set to srl
  • Status changed from new to accepted
  • Component changed from unknown to survey

comment:5 Changed 2 years ago by emmons

  • Phase changed from rc to dsub
  • Milestone changed from 28 to 29

Moving all survey related to 29dsub

comment:6 Changed 21 months ago by emmons

  • Milestone changed from 29 to upcoming

Automatic move of all 29 -> upcoming

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.