简体   繁体   中英

Why do I have a huge number of 'concatenated strings' of the same html in my chrome dev tools memory tab

I've just started using the 'Memory' tab within my Chrome Dev tools to try to understand my javascript app. The result is below.

I can see that I have 21384 'concatenated string' of the same HTML code from my app. Why is this? This code should only appear once on the page.

Is this saying that I've somehow stored this string in memory 21384 times?

chrome 开发工具内存链接

It turned out this is something to do with how mustache.js caches files! I used Mustache.clearCache(); to deal with this memory leak

This article provided some insight

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM