-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] history: reduce memory allocation
Backport of d8d943b `addChange` is used *a lot*, like *a lot, a lot*, for every mutation in core plugins. Its performance is key. Currently `const [root, ...path] = args` creates a new array for `path`, the array is allocated, and must be garbage collected later. On the large formula dataset, with 20k rows (520k cells), and adding a column before A, then reload the spreadsheet: (average over 5 runs) minor GC addChange before 1609ms 1168ms after 1094ms 753ms -32% -35% The memory usage also decreases: right after loading, memory was ~1725Mb and ~792Mb after running the GC. It's now ~1455Mb right after loading and ~670Mb after running the GC. (I'm not sure why it goes from 792Mb to 670Mb. Is it just thanks to the removed "root" key) closes #3193 X-original-commit: 97ebec0 Signed-off-by: Rémi Rahir (rar) <[email protected]> Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
- Loading branch information
1 parent
e73505e
commit ad54be7
Showing
4 changed files
with
14 additions
and
13 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