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

优化文本内容排版和绘制性能 #970

Closed
andycall opened this issue Dec 11, 2021 · 2 comments · Fixed by #990
Closed

优化文本内容排版和绘制性能 #970

andycall opened this issue Dec 11, 2021 · 2 comments · Fixed by #990
Assignees
Labels
bug Something isn't working

Comments

@andycall
Copy link
Member

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

main

重现步骤 | Steps To Reproduce

长列表内部存在长文本

https://kraken.oss-cn-hangzhou.aliyuncs.com/demo/feeds-demo.js

重现代码 | Code example:

实际结果 | Actual results:

Layout 单次耗时较大,平均接近 1ms,有个甚至会达到 6ms,不过不会重复执行。但是会影响到加载更多时候的体验。
image

Paint 单次不会很大,但是滚动的时候,都会重复调用。累计之后也不少。
image

@andycall andycall added the bug Something isn't working label Dec 11, 2021
@andycall andycall self-assigned this Dec 11, 2021
@andycall
Copy link
Member Author

其中有个文本长度达到 1000多,但是实际展示只有一点,都被 overflow 给隐藏了。文本的长度和 layout 的时间成正比关系。

@andycall
Copy link
Member Author

针对带有 overflow 的文本,显示宽度大于 layout 尺寸的场景可以优化一下。

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

Successfully merging a pull request may close this issue.

1 participant