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

Avoid calculating version twice on startup #3762

Merged

Conversation

jenshnielsen
Copy link
Collaborator

@jenshnielsen jenshnielsen commented Jan 3, 2022

this is already statically avaliable as qcodes.__version__

This shaves of 0.3 sec or so from the start up time.
It may be worthwile deprecating the version module. However #3731 fixes this anyway in a way that ensures version is only calculated once per session

this is already statically avaliable as qcodes.__version__
@jenshnielsen jenshnielsen changed the title Avoid calculating version again Avoid calculating version twice on startup Jan 3, 2022
@jenshnielsen
Copy link
Collaborator Author

Note that this is technically an api break as qcodes.version used to be a valid module after importing qcodes (since the data array module pulled it in) without explicitly importing it. That is no longer the case

@jenshnielsen
Copy link
Collaborator Author

We should perhaps give this a breaking change entry

@codecov
Copy link

codecov bot commented Jan 3, 2022

Codecov Report

Merging #3762 (3dc8c3e) into master (a00867d) will decrease coverage by 0.01%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #3762      +/-   ##
==========================================
- Coverage   65.68%   65.66%   -0.02%     
==========================================
  Files         226      226              
  Lines       30581    30583       +2     
==========================================
- Hits        20086    20082       -4     
- Misses      10495    10501       +6     

qcodes/data/hdf5_format.py Show resolved Hide resolved
qcodes/data/hdf5_format.py Show resolved Hide resolved
@jenshnielsen
Copy link
Collaborator Author

bors merge

@bors bors bot merged commit af03852 into microsoft:master Jan 4, 2022
@jenshnielsen jenshnielsen deleted the speedup/avoid_calulating_version branch January 4, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants