S2 icon indicating copy to clipboard operation
S2 copied to clipboard

🐛关于2.x在MAC和windows环境下对大数据展示,出现不同性能的问题

Open NightRiderss opened this issue 11 months ago • 6 comments

🏷 S2 Version / S2 版本

Package Version
@antv/s2 2.1.8
@antv/s2-react
@antv/s2-react-components

💻 Sheet Type / 表格类型

  • [ ] PivotSheet
  • [X] TableSheet
  • [ ] PivotChartSheet
  • [ ] GridAnalysisSheet
  • [ ] StrategySheet
  • [ ] EditableSheet

🖋 Describe the bug / 问题描述

同样的表格,在MAC上面屏幕的分辨率越大,同屏渲染的内容越多滚动起来越卡。但是在windows上却没事。

⌨️ Code Snapshots / 代码片段

🔗 Reproduction link / 复现链接

📋 Steps to Reproduce the Bug or Issue / 重现步骤

环境:chrome 131.0.6778.205(正式版本) (arm64),macOS14.4.1,Apple M1 Pro,屏幕:2560*1440 https://s2.antv.antgroup.com/examples/case/performance-compare#table 将官方示例中的width修改为width: 3800,height: 3480。并且将浏览器页面缩放率减小到50%显示更多数据。滚动表格

😊 Expected Behavior / 期望行为

应该mac和window一样流畅才对,因为同样的条件下 https://s2-v1.antv.antgroup.com/examples/case/performance-compare/#table 降级到1.x发现mac环境下可流畅运行。 怀疑是2.x的渲染update方法里面有大量的性能浪费。又或者是mac与window的chrome内核处理有什么区别?

😅 Current Behavior / 当前行为

bug 滚动时候全是卡顿

💻 OS / 操作系统

  • [X] macOS
  • [ ] Windows
  • [ ] Linux
  • [ ] Others / 其他

🌏 Browser / 浏览器

  • [X] Chrome
  • [ ] Edge
  • [ ] Firefox
  • [ ] Safari (Limited support / 有限支持)
  • [ ] IE (Nonsupport / 不支持)
  • [ ] Others / 其他

NightRiderss avatar Jan 08 '25 07:01 NightRiderss

你好 @NightRiderss:

提 Issue 须知

⚠️ 在提出问题前,请确保你已经仔细阅读👓/搜索🔍过 官方文档常见问题 以及 图表示例, 并且已经搜索查阅过相关 Issues 列表Discussions 列表. 当你确定自己的问题没有解决方案时,请提交 issue。 ⚠️

如果是使用问题,不知道怎么用,移步 Discussions 讨论区 并提供 有效信息 进行 提问

参与社区共建

这是一个开源项目, 我们也有繁忙的业务要做, 是用自己的业余时间在维护, 为爱发电, 精力有限, 所以有时候 issue 响应速度不是那么及时, 如果你遇到了问题, 或者对 IssuesDiscussions 列表的问题感兴趣, 可以直接认领并尝试修复 (贡献指南),帮助 S2 变得更好, 而不是一味的埋怨和催促, 我们不是甲方乙方的关系.

github-actions[bot] avatar Jan 08 '25 07:01 github-actions[bot]

关于您提到的在 MAC 和 Windows 环境下对大数据展示出现不同性能的问题,目前没有找到相似的已知问题。您提到在 macOS 上的高分辨率下渲染变得卡顿,而在 Windows 上则没有问题。这可能与不同操作系统下的渲染机制或浏览器内核处理方式有关。

建议您可以尝试以下方法来进行性能优化:

  1. 检查浏览器设置:确保浏览器的硬件加速功能已开启。
  2. 更新浏览器:确保使用的是最新版本的浏览器。
  3. 减少渲染负担:尝试减少一次性渲染的数据量,或者分批次加载数据。
  4. 使用性能分析工具:利用浏览器的开发者工具中的性能分析功能,查看具体的性能瓶颈。

如果问题依然存在,建议您在 GitHub 上关注该问题的更新,或者提供更多的详细信息以帮助开发团队进行进一步的调查。

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

petercat-assistant[bot] avatar Jan 08 '25 07:01 petercat-assistant[bot]

你好 @NightRiderss,这个属于底层渲染引擎 AntV/G 的问题, 需要等待底层支持或修复后, 上层才能适配, 请耐心等待, 感谢你的理解。

Hello, @NightRiderss, This belongs to the underlying rendering engine AntV/G (https://g.antv.antgroup.com/), needs to wait for the underlying support or after repair, the upper can adapter, please wait patiently, thank you for your understanding.

github-actions[bot] avatar Jan 08 '25 07:01 github-actions[bot]

这个是 S2 2.0 依赖的 G 6.0 的性能下降导致, 需要等待底层优化, 目前没有解决方案, 见 https://github.com/antvis/G/issues/1712

cc @wang1212

lijinke666 avatar Jan 08 '25 07:01 lijinke666

我好像也遇到了 之前1.x的时候,滚动都很丝滑,升级2.x过后,在windows上明细感觉滚动不丝滑,滚动条和鼠标的拖动有明细的延后,后端同事的mac上总问我为什么这个页面为什么那么卡顿,我只能说我在windows上运行正常的

ctrlands avatar Jan 09 '25 03:01 ctrlands

这个问题使用@antv/[email protected]能解决吗?

Create-Peace avatar Feb 18 '25 03:02 Create-Peace