-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce redux saveState overhead (#283)
* Reduce redux saveState overhead I noticed my CPU was quite high when downloading big streams and most of the CPU was being spent doing browser.storage.local.set(...) for saving the state. This state only appears to be needed when the background page is reloaded (which will never happen if the a content-script is active. Buffering the save by 200ms reduces JS overhead by about ~40% (not including native methods overhead) and total CPU usage on my system (circa 2022 AMD 16 core) is reduced by ~28%. * change: use throttle --------- Co-authored-by: Shy <[email protected]>
- Loading branch information
Showing
4 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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