Replies: 2 comments
-
I am very well aware of speed issues, and your case is not even major. I know repositories where it takes more than a minute to run. Still, disabling some essential features does not seem like the right fix. Instead I would focus on making it run in parallel much better. With 8 cores would would likely make it ~6-7x faster, kinda similar with your idea, but more important: without disabling features. I would recommend using https://opendev.org/zuul/zuul-jobs/src/branch/master/roles as reference model for performance measurement as it contains lots of roles. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately during my attempts to test with zuul repo I was repeatedly beaten by:
So, I used whatever handy repos I had. I'm sorry, I was unable to grasp where it would be really beneficial to introduce the parallelization (e.g on enumerating playbook files or go further and parallelize rule applying). I went with parallel run by file, which you can see in master...ragne:parallel As for why I'm not bringing a PR, there's a couple of gotchas with my approach (and with parallelization in general). Either I did not figure it out, but I still have to measure impact of parallelizing I've done, but after applying lru (I'm sure you might find a couple other bottlenecks) it isn't so convincing anymore |
Beta Was this translation helpful? Give feedback.
-
Summary
The feature request arose when I tried to use ansible-lint as pre-commit hook and it took more than 10 seconds to complete.
Profiling shown that most of the time was spend in
ruamel.yaml.load
fromappend_skipped_rules
. Which is perfectly logical, becauseCLoader
AFAIK doesn't support comments.When I added a toggle flag, the total time went down to ~1.5 seconds.
Thus it would be nice to have a speed boost when parsing
#noqa
isn't needed for some reason (e.g you have skip tag instead)Issue Type
Additional Information
Example flamegraph:
Beta Was this translation helpful? Give feedback.
All reactions