-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce memory usage in staticExtFilteringEngine.HostnameBasedDB
Using pairs of integers allows the use of a single integer-only array to store lists of string indices associated to a specific hostname. Memory usage of instances of HostnameBasedDB as per Chromium's heap snaphshot (bytes): Before: 2,459,256 => specific cosmetic filters 944,152 => scriptlet filtering 736 --------- 3,404,144 After: 1,947,448 => " 757,936 => " 632 --------- 2,706,016 Ultimately, using 2 integers for each entry instead of a single one is still worth it because this allows the use of one single integer-only array instead of having to use an array of arrays for hostnames which have multiple entries.
- Loading branch information
Showing
1 changed file
with
15 additions
and
28 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