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

CLDR Ticket #8476(accepted tools)

Opened 3 years ago

Last modified 2 years ago

Change new XPathParts()...

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

Description (last modified by mark) (diff)

It is somewhat faster to call getInstance to get a frozen version (the frozen version can also prevent inadvertent errors. While it is probably not worth a concerted effort, people should probably use this when they are writing new code or touching old.

OLD
new XPathParts().set(path)

NEW
XPathParts.getFrozenInstance(path);

or if it allows modification,

XPathParts.getInstance(path);

Attachments

Change History

comment:1 Changed 3 years ago by mark

  • Description modified (diff)

comment:2 Changed 3 years ago by mark

  • Description modified (diff)

comment:3 Changed 3 years ago by emmons

  • Status changed from new to accepted
  • Component changed from unknown to perf
  • Priority changed from assess to minor
  • Phase changed from dsub to rc
  • Milestone changed from UNSCH to 28
  • Owner changed from anybody to mark
  • Type changed from unknown to tools

comment:4 Changed 2 years ago by mark

  • Priority changed from minor to major
  • Milestone changed from 28 to 29

Actually, I think this has the opportunity to be a significant performance win, because XPathParts.getFrozenInstance(path) drastically reduces memory thrash. Because we often have static or shared XPathParts, this can also reduce thread contention.

So changing to major, but 29.

Doing this could go in two phases.

  1. Replace all the set call sites by using XPathParts.getInstance(path);
  1. Progressively change files to use XPathParts.getFrozenInstance(path) instead; whenever that change fails in the tests, back out the changes.

comment:5 Changed 2 years ago by emmons

  • Milestone changed from 29 to upcoming

Auto 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.