Open Bug 1103857 Opened 10 years ago Updated 2 years ago

Use SegmentedVector for all large SafeBrowsing arrays

Categories

(Toolkit :: Safe Browsing, defect, P5)

defect

Tracking

()

REOPENED

People

(Reporter: gcp, Unassigned)

References

Details

Depends on: 1102525
Excellent! My patch for SegmentedVector currently provides a very simple interface that just allows appending and iterating. Is that enough for safebrowsing's purposes?
These are the large in-memory arrays: http://dxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/HashStore.h#189 http://dxr.mozilla.org/mozilla-central/search?q=%2Bvar-ref%3Amozilla%3A%3Asafebrowsing%3A%3AHashStore%3A%3AmAddPrefixes http://dxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/HashStore.cpp#928 http://dxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/HashStore.cpp#865 Elements(), SetLength(), RemoveElementsAt() etc would be needed. The code also assumes it can just index into the arrays in a load of places, most of that is iteration. This one isn't, though: http://dxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/HashStore.cpp?from=HashStore.cpp&case=true#478 So it would need a way to run sort() as well. Ironically if you want to implement it as a merge (removing the random access need) you'll blow up the memory usage again. I've already facepalmed over those qsort-is-really-mergesort stacks in the original bug.
Priority: -- → P5
Assignee: nobody → allstars.chh
Assignee: allstars.chh → nobody
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.