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

需要新增控制base.wxml模板属性方法 #7413

Closed
xinggangling opened this issue Aug 22, 2020 · 1 comment
Closed

需要新增控制base.wxml模板属性方法 #7413

xinggangling opened this issue Aug 22, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@xinggangling
Copy link

xinggangling commented Aug 22, 2020

这个特性解决了什么问题?

1.taro3默认会生成全量属性挂载在模板上
2.这会造成小程序解析wxml时会更耗时,setData时间会更长
3.可验证:修改taro3源码中默认生成的view属性,在长列表复杂页面里面,taro经过一系列处理后给小程序进行setData的数据长度只有100,但是setData的时间却需要1000ms;去掉所有除了event属性外的属性,仅仅是View的属性,时间少了300ms

image

这个 API 长什么样?

构建配置里面可配置生成的模板属性,很多模板属性并不会影响业务代码;并且这样做可以不升级兼容小程序新特性

@taro-bot2 taro-bot2 bot added the enhancement New feature or request label Aug 22, 2020
@Chen-jj
Copy link
Contributor

Chen-jj commented Aug 22, 2020

@xinggangling 感谢给到性能数据上面的反馈,后续到 RFC 下讨论咯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants