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

CLDR Ticket #10186(accepted)

Opened 2 years ago

Last modified 5 months ago

Investigate interning strings

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


We construct strings all the time in the survey tool. Many of these are persistent across the life of the survey tool, and we could probably reduce the memory footprint substantially by interning them. We should investigate these, since the memory footprint will correspond to both speed and reliability.

I suggest having a common Intern class to manage this. While investigating, have this class have a set of environment flags that we can use to switch interning on or off on a fine-grained manner, then try the ST under different configurations to look at memory usage.

We already intern the following:

  • Element names (XPathParts,...)
  • Starred paths
  • DtdData element/attribute names
  • GenerateBirths paths
  • CheckCldr.Options keys

Other possibilities:

  • All distinguished paths
  • Constructed paths in XMLSource
  • All paths that go into CLDR files (superset of above)
  • Attribute names (XPathParts,...)
  • Attribute values??
  • Any key that we are already caching.


  • we don't want to intern items that are not persistent across the life of the ST; that has the contrary effect of using up memory for no purpose.
  • we should use a common interning (String.intern for strings); otherwise we are again wasting memory.


Change History

comment:1 Changed 2 years ago by emmons

  • Status changed from new to accepted
  • Component changed from unknown to util
  • Priority changed from assess to medium
  • Phase changed from dsub to rc
  • Milestone changed from UNSCH to upcoming
  • Owner changed from anybody to mark
  • type changed from unknown to tools

comment:2 Changed 2 years ago by mark

Need to so this with memory profiling (eg with NetBeans & Tomcat).

comment:3 Changed 5 months ago by pedberg

  • Milestone changed from upcoming to UNSCH

CLDR 34 BRS closing item, move all upcoming → UNSCH

comment:4 Changed 5 months ago by mark

  • Component changed from util to infrastructure

Add a comment

Modify Ticket

as accepted

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

Note: See TracTickets for help on using tickets.