Closed LiangZugeng closed 6 years ago
感谢提交 MR,本周会进行 Review。
@eternalsky Just wonder if you've already finished the review yet, we are waiting for this optimization to publish our new release.
sorry for long waiting,review will be finished today
The revised update uses deepEqual to compare all data in SCU instead of doing it manually, we also changed the way onChange and onScrolling properties are assigned, removed the .bind as it caused the values of onChange/onScrolling properties changed everytime which further invalidated the nextProps equality.
See jsx-no-bind for more information.
In order to improve the performance, we would like to suggest the saltui team stop using bind and switch to the way we demonstrated in the code, or autobind ES7 decorator, or property initializer.
时间日期控件在某些老一点的安卓机型(Oppo R9)上的钉钉软件中,在YMDHM格式的控件上对日期进行选择的时候性能非常差,原因为:Pane的onScrollStart事件处理函数进行了setState导致render,这样就不能及时相应scroll。
另外Datetime控件在YMDHM格式时提供了太多的data(YMD一栏为3年的数据,超过1000个),导致render的时候map花了太多时间,这点没有在这个pr中进行优化。
总的来观察,对老的机型,本次优化提升了10x以上的scroll响应速度。