Open
Bug 1503481
Opened 6 years ago
Updated 2 years ago
Cache visited URLs more efficiently in `GeckoViewHistory`
Categories
(GeckoView :: General, enhancement, P5)
GeckoView
General
Tracking
(Not tracked)
NEW
People
(Reporter: lina, Unassigned)
References
Details
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++.
Comment 1•6 years ago
|
||
Lina looks like you are taking this bug?
Assignee: nobody → lina
Priority: -- → P2
Updated•6 years ago
|
Product: Firefox for Android → GeckoView
Reporter | ||
Comment 2•5 years ago
|
||
I think this is worth doing someday (and it's not quite a "good first bug"—but a good bug for a more experienced contributor), but not urgent. We can revisit if history lookups in our mobile apps turn out to be a bottleneck.
Assignee: lina → nobody
Priority: P2 → P5
Reporter | ||
Comment 3•5 years ago
|
||
Bug 1594368, comment 1 suggests doing just that!
See Also: → 1594368
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•