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

Attribute性能问题 #17

Closed
lianqin7 opened this issue Apr 28, 2013 · 6 comments
Closed

Attribute性能问题 #17

lianqin7 opened this issue Apr 28, 2013 · 6 comments
Milestone

Comments

@lianqin7
Copy link
Member

image

如图所示,在一个有 144个模块的中等复杂度的表单页面 ,除开seajs的一些函数调用,最废时间的就是 attitude 里的 isPlainObjectmerge 方法,这块是否能有提升的空间?

@lifesinger
Copy link
Member

应该可以优化,五一后好好看下

On Sun, Apr 28, 2013 at 4:22 PM, lianqin7 [email protected] wrote:

[image: image]https://f.cloud.github.com/assets/2155909/435480/86cdf090-afdc-11e2-9490-5f028ab5caa1.png

如图所示,在一个有 144个模块的中等复杂度的表单页面 ,除开seajs的一些函数调用,最废时间的就是 attitude 里的
isPlainObject 和 merge 方法,这块是否能有提升的空间?


Reply to this email directly or view it on GitHubhttps://github.com//issues/17
.

王保平 / 玉伯(射雕)
送人玫瑰手有余香

@lianqin7
Copy link
Member Author

lianqin7 commented May 8, 2013

@popomore @lifesinger

稍微的提醒一下:)

@popomore
Copy link
Member

@lianqin7 这个性能问题可能跟 #19 也有关系,你们有没有用某个除了 Element 的复杂对象作为属性的场景。像例子里面的 moment。

@popomore
Copy link
Member

目前优化的进度 http://jsperf.com/arale-attribute/2

@lianqin7
Copy link
Member Author

赞!

popomore added a commit that referenced this issue May 14, 2013
@popomore
Copy link
Member

目前 merge 和 isPlainObject 的执行次数减少了一半左右,但仍然还是 attribute 最耗时间的。

如再提高性能,需要整体重构了,影响比较大,视运行情况而定。

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

3 participants