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

重大性能问题-flex元素单一变化导致全局重排版,单次layout耗时达到176ms #1001

Closed
pba-cra opened this issue Dec 21, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@pba-cra
Copy link

pba-cra commented Dec 21, 2021

使用的 Kraken 版本 | What version of kraken are you using

0.8.4,0.8.0

重现步骤 | Steps To Reproduce

企业微信截图_4f32c702-fbd5-49a0-9714-39aad2bfb99b

重现代码 | Code example:
信息整理.zip

预期结果 | Expected results:
快速更新61号元素

实际结果 | Actual results:
单次layout耗时达到176ms

源代码中:box_model.dart
RenderLayoutBox 这个类中的markNeedsLayout会让所有parent为RenderFlexLayout的元素都进行标dirty
导致整个页面都dirty.因为整个页面所有元素都显示设置为flex排版。

@pba-cra pba-cra added the bug Something isn't working label Dec 21, 2021
@andycall
Copy link
Member

如果是 0.10-rc.1 版本呢?

@pba-cra
Copy link
Author

pba-cra commented Dec 21, 2021

我check一下

@pba-cra
Copy link
Author

pba-cra commented Dec 21, 2021

如果是 0.10-rc.1 版本呢?

坚果Pro3的手机,高通骁龙835
在0.10-rc.1版本上 debug模式30帧,profile模式40+帧。
比0.8.4和0.9.0版本要好。但是还是不符合预期这个改动匹配这个帧率还是不太合适。
然后报一些0.10-rc.1的bug,macos版本进入业务场景会闪退js层C++空指针异常,ios无法启动。
ui存在错乱的问题
94019e3eb8ff1bd11cccb49508f615d6
这个在0.9.0和0.8.4是没有的

@pba-cra
Copy link
Author

pba-cra commented Dec 21, 2021

如果是 0.10-rc.1 版本呢?
再报个error
type 'double' is not a subtype of type 'int'
I/flutter (14908): #0 ElementViewMixin.handleJSCall (package:kraken/src/dom/element_view.dart:46:37)
I/flutter (14908): #1 _callNativeMethods (package:kraken/src/dom/event_target.dart:71:38)
I/flutter (14908): #2 _FfiCallback_callNativeMethods (dart:ffi)
I/flutter (14908): #3 FfiTrampoline (dart:ffi)
I/flutter (14908): #4 _requestAnimationFrame.._runCallback (package:kraken/src/bridge/from_native.dart:253:13)
I/flutter (14908): #5 _requestAnimationFrame. (package:kraken/src/bridge/from_native.dart:265:19)
I/flutter (14908): #6 ScheduleFrameMixin.requestAnimationFrame. (package:kraken/src/module/schedule_frame.dart:23:17)

@pba-cra
Copy link
Author

pba-cra commented Jan 4, 2022

#1023

@pba-cra pba-cra closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants