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: decrease calls to setItems & grid invalidate #1363

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Jan 24, 2024

  • with the previous implementation when dataset was provided through the constructor, it was internally calling dataView.setItems(data) twice, this PR will now only call it once and is much closer to the other repos implementation which didn't have this issue (like Angular-Slickgrid is fine, or actually it's calling twice but the first time is always empty so it doesn't have any impact)
  • remove unnecessary calls to grid.invalidate()
  • remove unnecessary calls to grid.render() when grid.invalidate() is called just before, it is unnecessary since that the invalidate already calls the render internally, so no need to do the same thing twice

- with the previous implementation when dataset was provided through the constructor, it was internally calling `dataView.setItems(data)` twice, this PR will now only call it once and is much closer to the repos implementation which didn't have this issue (like Angular-Slickgrid)
- remove unnecessary calls to `grid.invalidate()`
- remove unnecessary calls to `grid.render()` when `grid.invalidate()` is used since that one already calls the render, so no need to do the same thing twice
Copy link

Cypress E2E Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 8ceec93. ± Comparison against base commit c43e67a.

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (91426d1) 99.7% compared to head (9dcf7a3) 99.7%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1363     +/-   ##
========================================
- Coverage    99.7%   99.7%   -0.0%     
========================================
  Files         199     199             
  Lines       21576   21567      -9     
  Branches     7202    7200      -2     
========================================
- Hits        21496   21487      -9     
  Misses         73      73             
  Partials        7       7             

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

@ghiscoding ghiscoding merged commit cab6898 into master Jan 24, 2024
7 checks passed
@ghiscoding ghiscoding deleted the perf/grid-invalidate branch January 24, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants