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(sheet): performan the expand range #3187

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

VicKun4937
Copy link
Contributor

  • if the sheet has none span, we can ignore span check logic
  • we treat the span merge cells has same value just like the [left, top] cell
  • we should check the span which may be added in the most left , top, right, bottom, so that can avoid the part of span be added in result range.

Here is performance compare:

the count is how many times we called matrix.getValue(row, col)
before:
Image
after with span check:
Image
without checked span:
Image

Copy link

github-actions bot commented Aug 26, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 95.13889% with 7 lines in your changes missing coverage. Please review.

Project coverage is 28.62%. Comparing base (10484d8) to head (02eda7d).
Report is 3 commits behind head on dev.

Files Patch % Lines
packages/sheets/src/basics/expand-range.ts 95.13% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3187      +/-   ##
==========================================
+ Coverage   28.52%   28.62%   +0.10%     
==========================================
  Files        2022     2023       +1     
  Lines      106773   106943     +170     
  Branches    23063    23114      +51     
==========================================
+ Hits        30453    30610     +157     
- Misses      76320    76333      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@VicKun4937 VicKun4937 added the qa:untested This PR is ready to be tested label Aug 26, 2024
Copy link
Member

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhaolixin7 zhaolixin7 added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Aug 26, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Aug 26, 2024
@VicKun4937 VicKun4937 merged commit 4a72204 into dev Aug 26, 2024
9 checks passed
@VicKun4937 VicKun4937 deleted the feat-sheet-expand-range-performance branch August 26, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants