Closed
Bug 1543319
Opened 5 years ago
Closed 5 years ago
Reduce memory used during Safe Browsing update
Categories
(Toolkit :: Safe Browsing, enhancement, P1)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
mozilla68
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: dimi, Assigned: dimi)
References
Details
Attachments
(2 files)
During Safe Browsing update, some used memory can be free ASAP and we can also replace the byte-reordering with in-place algorithm to save memory.
Assignee | ||
Comment 1•5 years ago
|
||
Here is the flow how prefixes are handled during an V4 update:
- Prefixes are received from Safe Browsing update, stored in ProtocolBuffer
- Copy the prefixes from ProtocolBuffer to TableUpdate structure
- Prefixes in TableUpdate are merged with local prefixes (stored in LookupCacheV4)
- Merged prefixes are processes by PrefixSet to generate the in-memory prefix
set data structure (MakePrefixSet).
In this patch, we free the prefixes stored in TableUpdate right after step3.
This reduces the peak memory used during an update (peak happens in step 4).
Assignee | ||
Comment 2•5 years ago
|
||
We don't need an additional array just for byte reordering, replace
it with in-place processing.
Testcase are modified because the LookupCacheV4::Build API now clears the
input parameter.
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/95e20c4ed6c3 P1. Free intermediate memory as early as possible during Safe Browsing update. r=gcp https://hg.mozilla.org/integration/autoland/rev/85e806016727 P2. Swap the byte order in-place. r=gcp
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/95e20c4ed6c3
https://hg.mozilla.org/mozilla-central/rev/85e806016727
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox68:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in
before you can comment on or make changes to this bug.
Description
•