pengkobe / reading-notes

:stars: to record daily reading notes. I build an issue blog to record daily FE study notes. suggestion and comments are welcomed.
https://github.com/pengkobe/reading-notes/issues
MIT License
13 stars 1 forks source link

Ionic/Angular 应用性能问题排查 #440

Open pengkobe opened 6 years ago

pengkobe commented 6 years ago

一般来说,要对使用框架的应用进行性能问题排查要比不使用框架的应用要复杂,你不知道框架做了什么优化操作,也不知道你是否误用了框架的 Api。这不,我就遇到性能问题了,由于界面刷新比较频繁,且用到了 ionic 路由操作,遇到了 dom node 节点和 js heap 缓慢上升的情况,但是打开控制台,全是一堆的 system 和 debug 对象,让人很是忧伤。此外,由于内存回收的时间节点不确定,也增加了排查的难度。所以第一件事情某不过于排除无关对象了,这是堆映射中可能列出的一些内容

除了这些,如 HTMLDivElement 也是有谷歌浏览器自己创建的

问题集

参考