-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix(sqllab): rendering performance regression #23653
fix(sqllab): rendering performance regression #23653
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #23653 +/- ##
=======================================
Coverage 67.93% 67.94%
=======================================
Files 1918 1918
Lines 73891 73890 -1
Branches 8058 8058
=======================================
+ Hits 50199 50204 +5
+ Misses 21633 21625 -8
- Partials 2059 2061 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This reverts commit a5b6ccc.
This reverts commit 394b933.
…apache#23671) (cherry picked from commit 40bf1a5)
SUMMARY
When a schema contains a humorous table list, rendering cost of SqlEditorLeftBar is heavy since it requires to iterate millions items. To avoid the lag of using sql editor, we should avoid the LeftBar rendering while typing.
This commit removes the unnecessary immediate
QUERY_EDITOR_SET_SQL
action (and it's already covered by the next line setQueryEditorAndSaveSqlWithDebounce function) while typing which triggers the re-rendering of SqlEditorLeftBar.(Still need refactoring SqlEditor to avoid observing all sqlEditor updates. I will follow up additional work once redux-toolkit (+r eact-query) migration completed)
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After (no lag while typing):
after--rendering-perf.mov
Before (typing at same speed):
before--rendering-perf.mov
TESTING INSTRUCTIONS
open sqllab with a list of > 100,000 tables
typing in the sql editor
ADDITIONAL INFORMATION