-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
leaps loads documents twice (on first load) #5
Comments
Also, leaps seems to fetch the document every This is a problem, if we have a lot of documents open. Afaik most people keep a lot of idle tabs around.. |
From scanning the code I can't see straight away where this is happening but there's certainly no reason for it. I'm planning on looking into this next time I'm free but if anyone works it out feel free to send a pull request. |
I suspect it's Maybe |
Ah gross, I remember choking over this before. I'll leave this open for now and come back after a few sleeps. |
Instrumenting
store.Fetch
I saw that leaps calledstore.Fetch
a lot.Fixing the
flush_period_ms
to 60s helped a lot. I guess if you're using the file system 500ms might be sane (for a few files), but anything else we're probably better off with a much higher default.Anyways, whenever a document is opened for the first client, not the second client, it's fetched twice.
I assume the leaps doesn't keep active documents in memory, which is why it does fetch prior to storing anything. I like that, very efficient.
Perhaps I should do a pull-through storage engine that caches on disk, and does a real fetch if the file isn't on disk.. It could be done as a wrapper to any storage engines.
The text was updated successfully, but these errors were encountered: