Bug 1867137 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Daniel Holbert [:dholbert] from comment #2)
> This could be made much better if we only serialized a single copy of this 200KB bugzilla favicon and referenced that single copy from multiple places in the sessionstore JSON content.

Presumably we have the same issue de-serializing the icon data when we restore a session? We could probably use a unique icons set (which will need to serialize to an object/dictionary) for the icon urls, and replace the inlined value with a reference. We seem to only use `$`ref` in the context of JSON Schemas, but if we could use it here don't think fixing this would be that much work actually. 

We also need to be able to incrementally update that persisted state without writing the whole file to disk every time. But that is a separate issue.
(In reply to Daniel Holbert [:dholbert] from comment #2)
> This could be made much better if we only serialized a single copy of this 200KB bugzilla favicon and referenced that single copy from multiple places in the sessionstore JSON content.

Presumably we have the same issue de-serializing the icon data when we restore a session? We could probably use a unique icons map or object for the icon urls, and replace the inlined value with a reference. We seem to only use `$`ref` in the context of JSON Schemas, but if we could use it here don't think fixing this would be that much work actually. 

We also need to be able to incrementally update that persisted state without writing the whole file to disk every time. But that is a separate issue.
(In reply to Daniel Holbert [:dholbert] from comment #2)
> This could be made much better if we only serialized a single copy of this 200KB bugzilla favicon and referenced that single copy from multiple places in the sessionstore JSON content.

Presumably we have the same issue de-serializing the icon data when we restore a session? We could probably use a unique icons map or object for the icon urls, and replace the inlined value with a reference. We seem to only use `$ref` in the context of JSON Schemas, but if we could use it here don't think fixing this would be that much work actually. 

We also need to be able to incrementally update that persisted state without writing the whole file to disk every time. But that is a separate issue.

Back to Bug 1867137 Comment 3