-
Notifications
You must be signed in to change notification settings - Fork 495
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
loading rules takes a while #306
Comments
looks like yaml parsing is known to be slow: https://stackoverflow.com/questions/27743711/can-i-speedup-yaml definitely looks like we want to use the CLoader when possible. probably want to avoid using the ruamel parser except when doing linting/formatting. hopefully we can embed the shared object in the pyinstaller distribution. |
flamegraph generated using https://github.com/benfred/py-spy
|
|
need to figure out #312 before we continue here. should prefer to use PyYAML.CLoader when possible. hopefully we can embed this within pyinstaller binaries. |
loading the ruleset of 300+ rules from their yaml files takes around 5s on my laptop. it's minorly annoying when I'm doing analysis, and also prevents me from running capa iteratively against a large corpus of samples.
we should profile the rule loading logic and see if we can make this much faster. running capa probably involves reading and parsing 300+ python files, but this happens within a few ms. so why is rule loading so much slower?
The text was updated successfully, but these errors were encountered: