-
Notifications
You must be signed in to change notification settings - Fork 473
SessionStorage: Write state as stream to disk instead of building model in memory first. #8358
Conversation
c995538
to
27c961d
Compare
@@ -18,5 +19,14 @@ interface EngineSessionState { | |||
* When reading JSON from disk [Engine.createSessionState] can be used to turn it back into an [EngineSessionState] | |||
* instance. | |||
*/ | |||
@Deprecated("Use writeTo() instead.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should we also include when this will be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to have a fixed date for removing this since we first need time to migrate some of our own components code over. My primary goal was to avoid any new code using this. :)
But I filed a new issue for eventually migrating everything and will also link this in a comment: #8370
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
27c961d
to
582433d
Compare
bors r=Amejia481 |
bors r- |
Canceled. |
…hen writing to disk and log error.
582433d
to
18774d2
Compare
bors r=Amejia481 |
8358: SessionStorage: Write state as stream to disk instead of building model in memory first. r=Amejia481 a=pocmo With this change we are using `JsonWriter` to write `BrowserState` directly to disk using a stream. Previously we first build a `JSONObject` tree in memory. This essentially duplicates the state and that could become big if a user had a lot of tabs open and not much RAM. Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
Build failed: |
18774d2
to
29fb030
Compare
bors retry |
8358: SessionStorage: Write state as stream to disk instead of building model in memory first. r=Amejia481 a=pocmo With this change we are using `JsonWriter` to write `BrowserState` directly to disk using a stream. Previously we first build a `JSONObject` tree in memory. This essentially duplicates the state and that could become big if a user had a lot of tabs open and not much RAM. Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
Build failed: |
…disk instead of building model in memory first.
29fb030
to
443d6a1
Compare
bors retry |
Build succeeded: |
With this change we are using
JsonWriter
to writeBrowserState
directly to disk using a stream. Previously we first build aJSONObject
tree in memory. This essentially duplicates the state and that could become big if a user had a lot of tabs open and not much RAM.