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

Improve config parsing and osqueryfuzz-config performance #7635

Merged

Conversation

Smjert
Copy link
Member

@Smjert Smjert commented Jun 18, 2022

  • Speed up config parsing in stripConfigComments by using string_view
    to avoid unnecessary and slow string copies

  • Speed up osqueryfuzz-config by periodically resetting
    the custom flags map

  • Lower the chances of an OOM by periodically resetting
    the options config parser state, since it grows incrementally
    each time it parses new options. Also call malloc_trim.

Related to #7634

@Smjert Smjert added performance configuration oss-fuzz Issues related to integrations with oss-fuzz. labels Jun 18, 2022
@Smjert
Copy link
Member Author

Smjert commented Jun 18, 2022

Depends on #7636

- Speed up config parsing in stripConfigComments by using string_view
  to avoid unnecessary and slow string copies

- Speed up osqueryfuzz-config by periodically resetting
  the custom flags map

- Lower the chances of an OOM by periodically resetting
  the options config parser state, since it grows incrementally
  each time it parses new options. Also call malloc_trim.
@Smjert Smjert force-pushed the stefano/fuzz/improve-config-perf branch from 59dab9b to 6acd79f Compare July 3, 2022 16:21
@Smjert Smjert marked this pull request as ready for review July 3, 2022 16:22
@Smjert Smjert requested review from a team as code owners July 3, 2022 16:22
@Smjert Smjert merged commit 2f102d2 into osquery:master Jul 3, 2022
@Smjert Smjert deleted the stefano/fuzz/improve-config-perf branch July 3, 2022 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration oss-fuzz Issues related to integrations with oss-fuzz. performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants