Chrome Dev Tools - Profiles - Heap Snapshot - (concatenated string)

54 views
Skip to first unread message

Damien Murphy

unread,
Aug 31, 2016, 4:06:30 PM8/31/16
to Google Chrome Developer Tools
Hi,

I have noticed I have a lot (76k) concatenated strings in my application. Mainly due to translation property files with many strings.

My question is what exactly are these and why do they persist?


When I do a before and after profile heap snapshot I see the following after I click the button 10 times.


Why are these strings being stored in the concatenated strings? (note they also show up in the (string) section)

The issue becomes even more aparent in (string) section when the string is built up word by word (which is what is happening in my translation code to replace variables)


Here is what I see in the (string) section 

Notice that the following strings are repeated many times

"STR=Test" 
"String"
"STR=Test"
"String"
"STR=Test"


Thanks in advance
Damien 
string2.png
string.png
profile.png
Reply all
Reply to author
Forward
0 new messages