Closed roaldnefs closed 4 years ago
@roaldnefs just for fun, can you post here some performance information on this?
The improvement isn't really noticeable. I did a couple of test runs on our own states, this are the fastest results.
The develop
branch:
$ time find . -type f -name "*.sls" | xargs --no-run-if-empty salt-lint
real 0m0,336s
user 0m0,287s
sys 0m0,023s
And some test run on this branch:
$ time find . -type f -name "*.sls" | xargs --no-run-if-empty salt-lint
real 0m0,300s
user 0m0,281s
sys 0m0,018s
Ok, but I guess it is always faster. It could be more relevant if we add more checks.
Ok, but I guess it is always faster. It could be more relevant if we add more checks.
Yes, and the existing code is also a good example for new contributors.
Update
list()
to[]
anddict()
to{}
for performance improvement.Fixes #132.