-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize json sanitizing in Wallet #30940
Comments
Another alternative is use the same DataDecoder instance - that should result in only 1 new process afaik. |
Also the best option to spawns zero processes if we don't need them ;) |
Are these internal (AKA trusted) CRX's only? If they are general CRX's like those from the extension stores, they probably need to be sanitized even if they pass signature verification. |
|
@fmarier and I discussed this and think it's fine to optimize here and consider this trusted content: From @fmarier:
|
Thanks for the input @kdenhartog, I'll remove the call to |
Currently the wallet code:
Brave Wallet data files
component even if a user doesn't have a wallet.data_decoder::JsonSanitizer::Sanitize
. That results in spawning 5 'DataDecoderService` processes during the each startup.These processes have a short live time, but spawning them takes CPU/memory. That could affect the end user experience because it happens during the startup.
Steps to debug (1):
Alternative way: add a break in
DataDecoder::ParseJson
;Steps to debug (2):
--trace-startup=toplevel --trace-startup-file=/tmp/trace.json --trace-startup-duration=20
trace.json
;data_decoder.mojom.DataDecoderService
processes;Possible optimizations:
The text was updated successfully, but these errors were encountered: