Skip to content
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

Perf review all Brave usage of data_decoder::DataDecoder::ParseJson* #30967

Closed
atuchin-m opened this issue Jun 12, 2023 · 2 comments
Closed

Perf review all Brave usage of data_decoder::DataDecoder::ParseJson* #30967

atuchin-m opened this issue Jun 12, 2023 · 2 comments
Assignees
Labels
OS/Android Fixes related to Android browser functionality OS/Desktop perf

Comments

@atuchin-m
Copy link
Contributor

As was investigated in #30937 we spawn a lot of DataDecoder instances.
The primary sources are:

  1. Wallet component: Optimize json sanitizing in Wallet #30940
  2. APIRequestHelper (used by number of components)

We need:

  1. disable sanitizing if we don't need it in a particular place. We don't need to sanitize local already validated data (like component updater content). We could also add no_sanitize option to APIRequestHelper;
  2. Implement some policy to reuse DataDecoder instances (ask @brave/sec-team). For example, reusing an instance by key = profile + origin looks enough secure;
  3. Do we need to sanitize jsons for Brave controller backend?
  4. Add some metrics to monitor DataDecoder usage;
  5. Stop sanitizing on the startup if possible.
@atuchin-m atuchin-m added perf OS/Android Fixes related to Android browser functionality OS/Desktop labels Jun 12, 2023
@atuchin-m atuchin-m self-assigned this Jun 12, 2023
@atuchin-m
Copy link
Contributor Author

After the rust-based sanitizer is merged it's no more an actual problem: there is no more extra process spawning to sanity JSONs.
Closed

@atuchin-m atuchin-m closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2023
@atuchin-m
Copy link
Contributor Author

#35886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS/Android Fixes related to Android browser functionality OS/Desktop perf
Projects
None yet
Development

No branches or pull requests

1 participant