Closed Bug 1499252 Opened 6 years ago Closed 6 years ago

retrieve kvstore pairs lazily when enumerating them

Categories

(Toolkit :: Storage, enhancement, P2)

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: myk, Assigned: myk)

References

Details

In the XPCOM FFI to rkv being implemented in bug 1490496, we retrieve key/value pairs eagerly when enumerating them. This is potentially expensive, and it would be better to retrieve them lazily on SimpleEnumerator.get_next().
Priority: -- → P2

I chatted with Richard Newman about this a few months ago, and he thinks the current implementation (an async call from JS to Rust that retrieves the pairs eagerly on a background thread, then synchronous iteration in JS of the retrieved pairs) is actually likely to be the optimal one, as holding onto an LMDB transaction across many async iterations will be harder to reason about, may cause memory and disk growth, and could end up being less performant/responsive overall anyway.

So I'll close this bug. But we can reopen (or, more likely, file anew) if we discover issues with the current implementation that warrant revisiting the idea.

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.