-
Notifications
You must be signed in to change notification settings - Fork 357
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: improved textcell performance for novels #8986
Conversation
This fixes an issue where the glide table performance would chug when given a text cell with lots of text to truncate. while `measureText` is more performant than getBoundingClientRectangle, it can still be problematic to call excessively. To remedy, we implement a binary search for the longest string that's still below max width, reducing the number of times we need to measure the text for longer texts at the cost of calling it a few more times for shorter texts.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8986 +/- ##
==========================================
- Coverage 47.49% 42.75% -4.74%
==========================================
Files 1168 848 -320
Lines 176296 137036 -39260
Branches 2352 2352
==========================================
- Hits 83733 58592 -25141
+ Misses 92405 78286 -14119
Partials 158 158
Flags with carried forward coverage won't be shown. Click here to find out more.
|
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Really nice performance improvement!
This fixes an issue where the glide table performance would chug when given a text cell with lots of text to truncate. while `measureText` is more performant than getBoundingClientRectangle, it can still be problematic to call excessively. To remedy, we implement a binary search for the longest string that's still below max width, reducing the number of times we need to measure the text for longer texts at the cost of calling it a few more times for shorter texts.
Description
This fixes an issue where the glide table performance would chug when given a text cell with lots of text to truncate. while
measureText
is more performant than getBoundingClientRectangle, it can still be problematic to call excessively. To remedy, we implement a binary search for the longest string that's still below max width, reducing the number of times we need to measure the text for longer texts at the cost of calling it a few more times for shorter texts.ET-71
Test Plan
Checklist
docs/release-notes/
.See Release Note for details.
Ticket
ET-71