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

【性能】100W单元格行列字段切换,内存爆满,等不到GC就崩溃,树状透视表不可用 #2756

Open
1 of 5 tasks
Azhi-ux opened this issue May 31, 2024 · 0 comments
Labels
💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 next 2.0-next 版本的问题

Comments

@Azhi-ux
Copy link

Azhi-ux commented May 31, 2024

🏷 Version

Package Version
@antv/s2 @antv/s2-v2.0.0-next.22

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

官网v2.0示例,在100W单元格透视表(树状)出现内存占用过高,导致表格及浏览器窗口崩溃不可用;

image

来回改变两次行列上的维度字段,内存一直占用,且内存不见回收,但是点击手动清理内存,就能降下来一部分。

image
image

⌨️ Code Snapshots

const s2Options = {
  width: 600,
  height: 480,
  hierarchyType: 'tree',
};
const s2DataConfig: S2DataConfig = {
  fields: {
    rows: ['type', 'subType', 'city','province'],
    columns: [],
    values: ['number'],
  },
  data: generateRawData(
    { province: 10, city: 100 },
    { type: 10, sub_type: 100 },
  ),
};

🔗 Reproduce Link

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

🤔 Steps to Reproduce

行列字段来回切换几次,观察内存变化,然后把列上字段全部放到行字段上。

😊 Expected Behavior

  • 期望树状透视表能降低当前渲染的内存占用,保证浏览器及表格的可用性。
  • 如果内存占用过高,可能存在浏览器崩溃的问题,这块是否能提前提示用户,是否执意渲染?
  • 横向对比了很多开源表格,咱们的透视表(树状)是最nice的,期待能有提升。

😅 Current Behavior

2024祝愿antv起飞🛫

💻 System information

Environment Info
System Mac: 14.3
Browser 版本 125.0.6422.113(正式版本) (arm64)
@github-actions github-actions bot added the next 2.0-next 版本的问题 label May 31, 2024
@github-actions github-actions bot added the 💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 next 2.0-next 版本的问题
Projects
None yet
Development

No branches or pull requests

1 participant