By analyzing the browser's memory tools leads to this conclusion window.__vdevtools_ctx has a memory leak
By analyzing the execution stack, it can be determined that the memory leak is due to timeline tab. When devtool starts, the timeline will automatically record vuex events and make a deep copy of the state(it is stored in window.__vdevtools_ctx.timelineEventMap), which, if the state is large and frequently modified, will cause the memory footprint to keep growing and not be freed up.
proposal
Add a button to start record in timeline tab, instead of automatically starting record event.
What problem does this feature solve?
issue
vue-devtools version is 6.5.1
By analyzing the browser's memory tools leads to this conclusion
window.__vdevtools_ctx
has a memory leakBy analyzing the execution stack, it can be determined that the memory leak is due to timeline tab. When devtool starts, the timeline will automatically record vuex events and make a deep copy of the state(it is stored in
window.__vdevtools_ctx.timelineEventMap
), which, if the state is large and frequently modified, will cause the memory footprint to keep growing and not be freed up.proposal
Add a button to start record in timeline tab, instead of automatically starting record event.