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 performance by factoring out pkg_resources #846

Merged
merged 3 commits into from Oct 14, 2018
Merged

Conversation

asottile
Copy link
Member

Resolves #840

This saves ~100ms on startup from some naive tests:

before

$ time pre-commit --version
pre-commit 1.11.2

real	0m0.363s
user	0m0.303s
sys	0m0.043s

$ time pre-commit --version
pre-commit 1.11.2

real	0m0.359s
user	0m0.319s
sys	0m0.032s

$ time pre-commit --version
pre-commit 1.11.2

real	0m0.384s
user	0m0.330s
sys	0m0.044s

after

$ time pre-commit --version
pre-commit 1.11.2

real	0m0.253s
user	0m0.221s
sys	0m0.028s

$ time pre-commit --version
pre-commit 1.11.2

real	0m0.254s
user	0m0.229s
sys	0m0.020s

$ time pre-commit --version
pre-commit 1.11.2

real	0m0.256s
user	0m0.219s
sys	0m0.024s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant