Use SegmentedVector for all large SafeBrowsing arrays

REOPENED
Unassigned

Status

()

defect
P5
minor
REOPENED
5 years ago
Last year

People

(Reporter: gcp, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Updated

5 years ago
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?
Reporter

Comment 2

5 years ago
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

Comment 3

Last year
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: Last year
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
You need to log in before you can comment on or make changes to this bug.