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

don't do inspect things in optimized mode (-O) #182

Merged
merged 2 commits into from
Aug 12, 2015

Conversation

JensTimmerman
Copy link
Contributor

just importing fancylogger spends 30% of it's time in inspect calls,
actuall logging was also spending lots of time in inspect calls.
if people want faster scripts, after they're doing debugging, -O can give them a bit of it here.

@hpcugentbot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/vsc-base-pr-builder/309/
Test PASSed (test).

@hpcugentbot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/vsc-base-pr-builder/310/
Test PASSed (test).

@ehiggs
Copy link
Contributor

ehiggs commented Aug 12, 2015

👍 This is super important!

@ehiggs
Copy link
Contributor

ehiggs commented Aug 12, 2015

$ python -m timeit -c 'from vsc.utils.generaloption import GeneralOption; GeneralOption(go_args=[])'
10 loops, best of 3: 12 msec per loop

ehiggs added a commit that referenced this pull request Aug 12, 2015
don't do inspect things in optimized mode (-O)
@ehiggs ehiggs merged commit 443a227 into hpcugent:master Aug 12, 2015
@JensTimmerman
Copy link
Contributor Author

with patch:

-bash-4.1$ python -m timeit -c 'from vsc.utils.generaloption import GeneralOption; GeneralOption(go_args=[])'
10 loops, best of 3: 47 msec per loop
-bash-4.1$ python -O -m timeit -c 'from vsc.utils.generaloption import GeneralOption; GeneralOption(go_args=[])'
10 loops, best of 3: 3 msec per loop

caveat: I'm not sure if -O plays fair with timeit itself.

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

Successfully merging this pull request may close these issues.

3 participants