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

feat(perf): 优化 dataset 数据结构转化性能 #2379

Merged
merged 85 commits into from
Nov 29, 2023
Merged

Conversation

wjgogogo
Copy link
Contributor

@wjgogogo wjgogogo commented Oct 23, 2023

✨ Feature

  • New feature

🎨 Enhance

关键优化项 优化前 优化后
dataSet 数据处理时间  image  image
facet render 时间 无汇总分组 image 有汇总分组 image 无汇总分组image有汇总分组image
s2 实例内存占用  image image
getMultiData 查询效率 image   image

📝 注意

由于在定位中排除了EXTRA,对于多个values的数据:

{
	fields:{
	  rows: ["province", "city"],
      columns": ["type", "subType"],
       values": ["number1", "number2"],
	}
}

期望是如下的数据结构:

[{
  "province": "辽宁省",
  "city": "达州市",
  "type": "桌子",
  "subType": "家具",
  "number1": 3482.28,
  "number2": 34,
}]

而不是:

[{
  "province": "辽宁省",
  "city": "达州市",
  "type": "桌子",
  "subType": "家具",
  "number1": 3482.28,
},
{
  "province": "辽宁省",
  "city": "达州市",
  "type": "桌子",
  "subType": "家具",
  "number2": 34,
}]

🖼️ Screenshot

Before After

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

lijinke666 and others added 30 commits February 28, 2023 20:12
* feat(Api): 添加 totalDimensionGroup/subTotalDimensionGroup api,以及一些临时的开发函数

* feat(Hierarchy): 总计小计结点下添加Hierarchy

* feat(Render): getMultipleMap 实现,计算总计小计下的布局信息

* feat(Render): 按维度分组的小计总计下表头位置的调整和渲染

* feat(DataSet): 存在维度分组时的汇总值获取

* feat(DataSet): 存在维度分组时的汇总值获取

* feat(DataSet): 存在维度分组时的汇总值获取

* feat: 补充注释

* feat: 单测快照更新,添加isTotalRoot属性

* fix: 有多个 Value 时不允许隐藏度量列

* fix: 有多个 Value 时不允许隐藏度量列

* fix: 删除了一个莫名其妙的函数

* test: 按维度分组汇总能力单测

* docs: 按维度分组汇总能力文档

* test: 更新,多度量指标不允许隐藏指标头

* docs: 图片示例

* test: 更新 snap 数据文件

* chore: 版本号更新

* chore: 版本号更新

* chore: 版本号更新

* chore: 版本号更新

* chore: 版本号更新

* chore: 版本号更新

* chore: 版本号更新

* Merge remote-tracking branch 'origin/Juze_TotalsDimGroup' into Juze_TotalsDimGroup

* test: 更新快照

* chore: 删除开发测试文件

* fix: 汇总指标节点也是汇总节点

* chore: 删除无用文件

* fix: isTotalRoot 替换 isTotals

* fix: isTotalRoot 替换 isTotals

* fix: isTotalRoot 替换 isTotals

---------

Co-authored-by: JuZe <[email protected]>
test: 更新 React 包快照

Co-authored-by: JuZe <[email protected]>
@wjgogogo wjgogogo changed the title perf: 优化 dataset 数据结构转化性能 feat(perf): 优化 dataset 数据结构转化性能 Nov 29, 2023
@github-actions github-actions bot added the pr(feature) new feature label Nov 29, 2023
@github-actions github-actions bot removed the 🚨 test failed 单元测试挂了 label Nov 29, 2023
@wjgogogo wjgogogo merged commit 924da53 into alpha Nov 29, 2023
9 checks passed
@wjgogogo wjgogogo deleted the perf-dataset branch November 29, 2023 08:55
@lijinke666
Copy link
Member

🎉 This PR is included in version @antv/s2-v1.53.0-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

🎉 This PR is included in version @antv/s2-react-v1.45.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

🎉 This PR is included in version @antv/s2-v1.54.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

🎉 This PR is included in version @antv/s2-react-v1.46.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants