Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对流程无关的性能优化 #129

Closed
5 tasks done
leeluolee opened this issue Sep 26, 2016 · 0 comments
Closed
5 tasks done

对流程无关的性能优化 #129

leeluolee opened this issue Sep 26, 2016 · 0 comments

Comments

@leeluolee
Copy link
Member

leeluolee commented Sep 26, 2016

v0.5.2会对 流程无关的部分做一次统一的性能优化 ,其中包括

性能优化结果

只有Elm和Regularjs实现的DEMO能在IE10下进行运行,所以只对比了这两个

  • Firefox

image

上面只对运行做了profile,但实际上你可以发现,只有Regularjs和Elm的启动几乎是瞬间的,angular2运行性能不错,但是启动有非常明显卡顿,即使是如此简单的TODOMVC

为什么第二个case在某些浏览器中还是比Elm慢?因为有些流程相关的潜在问题

  • Regular基本没有做过针对平台的性能优化
  • 相比Virtual DOM的实现,Regularjs基于模板会带来更深的树形层级
  • 源码中大量使用了『原型继承』来达到数据层面的功能实现,这个引入了较大的数据索引和创建开销
  • 大量GC的存在

这个会在未来某个feature版本,比如0.6, 0.7 中进行优化尝试

不过大家可以参考下Elm的TodoApp的实现,代码比Regularjs多了三倍不止,孰优孰劣可以自行分辨。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant