Open Bug 1503481 Opened 4 years ago Updated 3 years ago
Cache visited URLs more efficiently in `Gecko
GeckoViewHistory currently stores URI hash keys in `mTrackedLinks` (each of which holds an `nsIURI` pointer: https://searchfox.org/mozilla-central/rev/fc3d974254660b34638b2af9d5431618b191b233/netwerk/base/nsURIHashKey.h#63), and removes them once all links have been notified. This means we need to query the delegate again and incur two IPC messages and two JNI calls every time we see a link that we already checked. Since we don't actually need the original URI, what if we stored just the hash in `mTrackedLinks` instead, and kept the entries around with `mStatus == TrackedURIStatus::Visited`? Alternatively, or maybe in addition to the above, we could add LRU eviction for visited URIs. Both would let us cut down on memory use. Bug 1197866 is related. `GlobalHistory` stores the visited set on the Java side, but I imagine the same would apply to C++.
Lina looks like you are taking this bug?
Assignee: nobody → lina
Priority: -- → P2
Assignee: lina → nobody
Priority: P2 → P5
You need to log in before you can comment on or make changes to this bug.