From d23d5b50a37ae2f7c3ec78c2901f9ff4fecd925d Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 17 Feb 2017 16:49:49 +0000 Subject: [PATCH] Increase the WRITE_DELAY on database syncing --- src/store/indexeddb.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/store/indexeddb.js b/src/store/indexeddb.js index c677dc4e9..9ff1230de 100644 --- a/src/store/indexeddb.js +++ b/src/store/indexeddb.js @@ -27,7 +27,13 @@ import utils from "../utils"; */ const VERSION = 1; -const WRITE_DELAY_MS = 1000 * 60; // once a minute + +// If this value is too small we'll be writing very often which will cause +// noticable stop-the-world pauses. If this value is too big we'll be writing +// so infrequently that the /sync size gets bigger on reload. Writing more +// often does not affect the length of the pause since the entire /sync +// response is persisted each time. +const WRITE_DELAY_MS = 1000 * 60 * 5; // once every 5 minutes /** * Construct a new Indexed Database store backend. This requires a call to