Remove extra horizontal scrollbar space, improve row height estimation - #41
Open
hovhannesmarikyan wants to merge 1 commit into
Open
Remove extra horizontal scrollbar space, improve row height estimation#41hovhannesmarikyan wants to merge 1 commit into
hovhannesmarikyan wants to merge 1 commit into
Conversation
| if (remainingRows > 0) { | ||
| h += (summedHeight / rowsSummed) * remainingRows; | ||
| } | ||
| } else { |
Author
There was a problem hiding this comment.
No idea if we need "else" block as is.
Coverage Report for CI Build 32818848642Coverage increased (+0.04%) to 89.271%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The grid's ideal-height calculation always reserved vertical space for a horizontal scrollbar, even when the content didn't actually overflow horizontally — leaving dead space below the grid in the
common case where everything fits.
For variable row heights (rowHeight as a function), the estimate also averaged only the first 10 rows and extrapolated that average across the entire dataset. On large, heterogeneous datasets this
could be significantly off, producing an incorrect ideal height and, ironically, a spurious scrollbar of its own.
Change
single outlier row), then extrapolates the remainder from that average — instead of always averaging just the first 10 rows regardless of dataset size. This stays O(1)-ish for huge datasets while
being far more accurate than the old fixed 10-row average.