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

v5/v6 版本滚动性能下降明显 #1712

Open
lijinke666 opened this issue Jun 18, 2024 · 9 comments
Open

v5/v6 版本滚动性能下降明显 #1712

lijinke666 opened this issue Jun 18, 2024 · 9 comments

Comments

@lijinke666
Copy link
Member

lijinke666 commented Jun 18, 2024

问题描述

S2 1.x 平均滚动帧率接近 60 fps

"@antv/g-canvas": "^0.5.12"

image

Kapture 2024-06-18 at 17 12 17

S2 2.x 平均滚动帧率只有 20+ fps, long task 很多, 且滚动一段时间后会出现 G 内部的堆栈溢出 (初步看起来应该不是 S2 导致的): antvis/S2#2771

image
image

"@antv/g": "^6.0.6",
"@antv/g-canvas": "^2.0.7",
"@antv/g-lite": "^2.0.5"

image

Kapture 2024-06-18 at 17 14 48

滚动相关的代码如下, 和 1.x 基本一致:

https://github.com/antvis/S2/blob/f8e00e535ceae093ef34e7de6cfe4a8cfc05f985/packages/s2-core/src/facet/base-facet.ts#L1331-L1433

G 这里没看到有 cancelRequestFrame 的操作, 不太懂这块实现, 且不管有没有滚动 (appendChild), 一直在执行 (看回复是脏检查 #1626 ? )

image

复现链接和步骤

https://s2.antv.antgroup.com/examples/case/performance-compare/#pivot

使用触摸板 水平/垂直滚动 10s 左右即可复现

Kapture 2024-06-18 at 17 55 16

期望

希望高优处理下

  1. 滚动帧率不要太低, 感到肉眼卡顿
  2. 解决频繁滚动后导致堆栈溢出的问题 (对于 G 来说应该就是频繁添加 大量 group 后, 再大量移除 group).
@lijinke666
Copy link
Member Author

请问有没有什么进展或结论

@db-shuai
Copy link

什么时候能修复啊 !!!!!

@EthanLiBin
Copy link

同问,有没有进展?

@easy1958
Copy link

+10086,有没有进展?

@DavisYao88
Copy link

没进展了吗?维护的大佬隐居了嘛

@db-shuai
Copy link

请问有没有什么进展或结论呢? 可以先回复一下么?或者有什么计划么?

@wang1212
Copy link
Member

wang1212 commented Aug 7, 2024

性能优化是关注的重点,但是短期内应该暂时解决不了,如果有更多技术细节可以持续反馈,会一直关注的

@hustcc hustcc pinned this issue Aug 7, 2024
@CrabSAMA
Copy link

CrabSAMA commented Aug 26, 2024

性能优化是关注的重点,但是短期内应该暂时解决不了,如果有更多技术细节可以持续反馈,会一直关注的

@wang1212 这块能提供一些问题可能发生的方向吗?是因为什么短期内解决不了呢?如果有可能的话看看能不能说一下,让社区的同学们一起尝试解决下。

@yyds-18
Copy link

yyds-18 commented Sep 18, 2024

我也复现了该问题,但是设置enableCulling: false,就可以避免Maximum的问题,性能上依然存在下降
"@antv/g": "^5.18.25",
"@antv/g-canvas": "^1.11.27",
"@antv/g-components": "^1.9.22",

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

No branches or pull requests

8 participants