Mozilla 2/Strings/Dynamic Analysis
<< back to Mozilla 2/Strings
The cost/benefit of UTF8
Question: If we moved from our current UCS2/UTF16 storage for nsAString to UTF8, what would the impact be on memory usage?
Instrument nsStringBuffer with a large linked-list (with locking and all that good stuff). Run the instrumented browser and collect data about all nsStringBuffers which hold PRUnichar data:
- What is the size of the buffer
- What would the size of the buffer be in UTF8?
- Is the buffer pure-ASCII?
Question: how much do we currently convert between UTF8 and UTF16?
Bonus points: group and identify common callstacks
- Dynamic analysis: autostring buffer-copy counts (are autostrings worthwhile)?
Procedure: todo [dmandelin] Does this mean (a) the fraction of nsAutoStrings that grow big enough to get moved to the heap, (b) the fraction of nsAutoStrings that end up being used to initialize a standard heap string, or both?