Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Disable periodic serialization for buffers > 2MB - #13583

Merged
nathansobo merged 1 commit into
masterfrom
ns-skip-periodic-serialization-of-huge-buffers
Jan 11, 2017
Merged

nathansobo merged 1 commit into
masterfrom
ns-skip-periodic-serialization-of-huge-buffers

Conversation

@nathansobo

Copy link
Copy Markdown
Contributor

The overhead of writing large amounts of data to IndexedDB is blocking the main thread for perceptible amounts of time, even though the API is asynchronous. A patch-based representation of the modified state could allows us to pay only for what has changed, but is too complex to justify implementing right now to support full crash recovery for large files. So instead, we'll only serialize the full text of files > 2MB on graceful shutdown of the window. Periodic serialization, which interleaves with fine-grained user interaction, will be limited to smaller files to ensure we don't make the editor unresponsive.

/cc @maxbrunsfeld

Writing so much data to IndexedDB is blocking the main thread for
perceptible amounts of time. A patch-based representation of the
modified state could allows us to pay only for what has changed, but is
too complex to justify implementing right now to support full crash
recovery for large files.

Signed-off-by: Max Brunsfeld <[email protected]>
@nathansobo
nathansobo force-pushed the ns-skip-periodic-serialization-of-huge-buffers branch from c81ebcd to dea7cc2 Compare January 10, 2017 22:55
@nathansobo
nathansobo merged commit c3ac59a into master Jan 11, 2017
@nathansobo
nathansobo deleted the ns-skip-periodic-serialization-of-huge-buffers branch January 11, 2017 18:27
@nathansobo

Copy link
Copy Markdown
Contributor Author

We've decided to do more work to enable modifications on larger files to be persisted, but it will take a while to reach the light of day. I still think pause free editing is worth disabling this in the meantime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant