-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] header_visibility: improve perfs of
findVisibleHeader
The way the getter `findVisibleHeader` was implemented as that it received an argument with all the indexes it need to check to find a visible header. This means that if we want to get the first visible col of a sheet, we have to first generate an array with all the indexes of the cols of the sheet, then looping on this array to find a visible col. This was very wasteful as : 1) we created an array that needed to be garbage collected after 2) the array contains all the indexes, but most of the time we only loop on the first few Changed the arguments of `findVisibleHeader` to receive `from` and `to` arguments. Benchmark : on a sheet 26 cols x 10.000 rows filled with numbers, try to delete the last column ----------- Before : ~2050ms. Most time taken by : - Garbage Collection : ~737ms - range() : ~729ms After: ~542ms. Most time taken by : - Garbage Collection : ~124ms - getRowTallestCellSize() : ~105ms Task: 3272878 Part-of: #2340
- Loading branch information
1 parent
2b4831d
commit 95a2949
Showing
4 changed files
with
48 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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