Skip to content

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Nov 14, 2022

This is for #163446. As it turns out, the storage service will not do any JSON.parse eagerly. Storage values are primitives but never objects. However, we seem to be doing some JSON.parse from here specifically for extensions:

I tried to reduce calls to this method in the renderer in favour of the new getExtensionStateRaw and move the parsing to the extension host to avoid large stalls in the renderer. In addition, I am logging a warning when an extension storage value exceeds 500kb.

@sandy081 there are still some calls to getExtensionState in your area which are probably needed but I think they also happen from another process?

//cc @alexdima

@bpasero bpasero enabled auto-merge (squash) November 14, 2022 14:43
@bpasero bpasero requested a review from sandy081 November 14, 2022 14:43
@bpasero bpasero self-assigned this Nov 14, 2022
@bpasero bpasero added this to the November 2022 milestone Nov 14, 2022
@bpasero bpasero merged commit 23cd002 into main Nov 14, 2022
@bpasero bpasero deleted the ben/industrial-earthworm branch November 14, 2022 14:58
@sandy081
Copy link
Member

Those calls to getExtensionState are for syncing extension state. In Desktop, this is called in shared process, where as in web it is still in same process.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2022
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.

3 participants