ali-sdk / node-profiler

Node Profiler from alinode team

Home Page:https://alinode.aliyun.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何解读 profile?

zensh opened this issue · comments

记得 5月12日 @JacksonTian 朴神为我等 Teambition 的小伙伴们现场开光,得道后我当晚即对 thunks 进行了一番优化,执行效率立马涨了一截。记得当时的主要优化点是用类 new 对象取代了直接创建对象。

这两天回头研究 node-profiler,想做进一步优化,对 thunks 优化前后的版本分别进行了切片研究,发现并没有看懂(老啦,忘啦)~

主要问题有:

  1. of Hidden Classes Created 表明了什么意义?
  2. 部分绿色(象征优化成功)代码行存在 Reason for Deoptimization,为何?

优化前:
qq20150720-1 2x
qq20150720-2 2x

优化后:
qq20150720-3 2x
qq20150720-4 2x

期待能够写些关于通过 node-profiler 进行优化的案例或文章