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

CLDR Ticket #10186(accepted tools)

Opened 3 weeks ago

Last modified 2 days ago

Investigate interning strings

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

Description

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.

Notes:

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

Attachments

Change History

comment:1 Changed 2 days 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 days ago by mark

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

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.