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: remove workspace dependancy from iris-grid-panel and memoize settings redux selector #1982

Merged
merged 1 commit into from
May 2, 2024

Conversation

dsmmcken
Copy link
Contributor

@dsmmcken dsmmcken commented May 2, 2024

Discovered as part of #1977 investigation. Typing in a notebook triggers a workspace update, which was triggering all tables to re-render. Removed deprecated dependeny of workspace from iris-grid.

Further settings is derived from workspace and returns a new settings object. Iris-grid depends on settings, but the object had no changes. Memoize the selector so it always returns the same object if settings haven't changed.

Removes ~100ms of lag that was occuring 400ms after the debounce of notebook key press events.

BREAKING CHANGE: getPluginContent deprecatedProps have been removed from iris-grid

… redux selector

Discovered as part of #1977 investigation. Typing in a notebook triggers a workspace update, which was triggering all tables to re-render. Removed deprecated dependeny of workspace from iris-grid.

Further settings is derived from workspace and returns a new settings object. Iris-grid depends on settings, but the object had no changes. Memoize the selector so it always returns the same object if settings haven't changed.

Removes ~100ms of lag that was occuring 400ms after the debounce of notebook key press events.

BREAKING CHANGE: getPluginContent deprecatedProps have been removed from iris-grid
@dsmmcken dsmmcken changed the title perf: remove workspace dependancy from iris-grid and memoize settings redux selector perf: remove workspace dependancy from iris-grid-panel and memoize settings redux selector May 2, 2024
@dsmmcken dsmmcken requested a review from mofojed May 2, 2024 18:35
Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.25%. Comparing base (147c8de) to head (5761035).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1982      +/-   ##
==========================================
- Coverage   46.25%   46.25%   -0.01%     
==========================================
  Files         668      668              
  Lines       38700    38697       -3     
  Branches     9796     9795       -1     
==========================================
- Hits        17900    17898       -2     
+ Misses      20746    20745       -1     
  Partials       54       54              
Flag Coverage Δ
unit 46.25% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

Tested with Enterprise, improves things bigly. Thanks!

@dsmmcken dsmmcken merged commit c3ea867 into main May 2, 2024
11 checks passed
@dsmmcken dsmmcken deleted the dmckenzie_settings_memoize branch May 2, 2024 22:33
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2024
@mattrunyon
Copy link
Collaborator

mattrunyon commented May 2, 2024

Was this tested with enterprise table plugins? I think it would break any customers using table plugins. Which might be fine going forward, but we need to give alternatives to those props if a customer was using them

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

Successfully merging this pull request may close these issues.

3 participants