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

perf: 优化生成grid模式时性能问题 #1686

Merged
merged 1 commit into from
Aug 15, 2022
Merged

perf: 优化生成grid模式时性能问题 #1686

merged 1 commit into from
Aug 15, 2022

Conversation

wjgogogo
Copy link
Contributor

👀 PR includes

✨ Feature

  • New feature

🎨 Enhance

  • Code style optimization
  • Refactoring
  • Change the UI
  • Improve the performance
  • Type optimization

🐛 Bugfix

  • Solve the issue and close #0

🔧 Chore

  • Test case
  • Docs / demos update
  • CI / workflow
  • Release version
  • Other ()

📝 Description

在DI侧,从明细模式切换到聚合模式时,如果数据量比较大,整个转换过程耗时非常久,排查原因是uniqWith函数耗时特别久
image

image

使用for来提前退出,减少开销

🖼️ 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.

@vercel
Copy link

vercel bot commented Aug 12, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
antvis-s2 ✅ Ready (Inspect) Visit Preview Aug 12, 2022 at 10:36AM (UTC)

@github-actions
Copy link
Contributor

Size Change: +20 B (0%)

Total Size: 426 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 166 kB +20 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 389 B
./packages/s2-core/node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js 21.7 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js 21.2 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js 60.3 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/@testing-library/dom.umd.min.js 33.9 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/config.js 1.16 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/DOMElementFilter.js 1.87 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/event-map.js 1.18 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/events.js 1.55 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/get-node-text.js 300 B
./packages/s2-core/node_modules/@testing-library/dom/dist/get-queries-for-element.js 738 B
./packages/s2-core/node_modules/@testing-library/dom/dist/get-user-code-frame.js 810 B
./packages/s2-core/node_modules/@testing-library/dom/dist/helpers.js 1.07 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/index.js 1.14 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/label-helpers.js 1.05 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/matches.js 1.14 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/pretty-dom.js 1.47 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/all-utils.js 337 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/alt-text.js 573 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/display-value.js 713 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/index.js 418 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/label-text.js 1.8 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/placeholder-text.js 491 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/role.js 2.67 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/test-id.js 498 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/text.js 958 B
./packages/s2-core/node_modules/@testing-library/dom/dist/queries/title.js 718 B
./packages/s2-core/node_modules/@testing-library/dom/dist/query-helpers.js 1.81 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/role-helpers.js 2.82 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/screen.js 1.51 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/suggestions.js 1.5 kB
./packages/s2-core/node_modules/@testing-library/dom/dist/wait-for-element-to-be-removed.js 748 B
./packages/s2-core/node_modules/@testing-library/dom/dist/wait-for.js 2.38 kB
./packages/s2-react/dist/index.min.js 64.1 kB
./packages/s2-react/dist/style.min.css 3.21 kB
./packages/s2-vue/dist/index.min.js 20.4 kB
./packages/s2-vue/dist/style.min.css 1.61 kB

compressed-size-action

@codecov
Copy link

codecov bot commented Aug 12, 2022

Codecov Report

Merging #1686 (74c0dfb) into master (ba88dec) will increase coverage by 0.33%.
The diff coverage is 76.36%.

@@            Coverage Diff             @@
##           master    #1686      +/-   ##
==========================================
+ Coverage   77.10%   77.44%   +0.33%     
==========================================
  Files         231      231              
  Lines       11197    11219      +22     
  Branches     2361     2370       +9     
==========================================
+ Hits         8634     8688      +54     
+ Misses       1244     1219      -25     
+ Partials     1319     1312       -7     
Impacted Files Coverage Δ
...ackages/s2-core/src/interaction/brush-selection.ts 82.77% <ø> (+0.23%) ⬆️
packages/s2-core/src/ui/scrollbar/index.ts 56.49% <52.94%> (+5.88%) ⬆️
packages/s2-core/src/facet/base-facet.ts 85.22% <82.60%> (+3.30%) ⬆️
...s/s2-core/src/facet/layout/build-gird-hierarchy.ts 85.00% <90.00%> (+0.09%) ⬆️
...eraction/base-interaction/click/data-cell-click.ts 82.81% <100.00%> (+11.90%) ⬆️
...ages/s2-core/src/utils/interaction/select-event.ts 93.61% <100.00%> (-1.12%) ⬇️
...ckages/s2-core/src/interaction/event-controller.ts 83.39% <0.00%> (+0.38%) ⬆️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lijinke666 lijinke666 merged commit a4f52e6 into master Aug 15, 2022
@lijinke666 lijinke666 deleted the perf-grid branch August 15, 2022 03:12
@lijinke666
Copy link
Member

🎉 This PR is included in version @antv/s2-v1.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants