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

Reduce overhead in parameter validation #4887

Merged
merged 2 commits into from
Jan 2, 2023

Conversation

peendebak
Copy link
Contributor

@peendebak peendebak commented Dec 27, 2022

The parameter validator spends a large amount of time in generating the validation context (only used if the validation fails), instead of the actual parameter validation. Profiling results with snakeviz:

validate

This PR reduces the overhead by using a cached_propery decorator. This is possible since the instrument and parameter name are immutable in qcodes.

@jenshnielsen

@codecov
Copy link

codecov bot commented Dec 27, 2022

Codecov Report

Merging #4887 (a239b49) into master (a239b49) will not change coverage.
The diff coverage is n/a.

❗ Current head a239b49 differs from pull request most recent head 72ad4cf. Consider uploading reports for the commit 72ad4cf to get more accurate results

@@           Coverage Diff           @@
##           master    #4887   +/-   ##
=======================================
  Coverage   68.31%   68.31%           
=======================================
  Files         340      340           
  Lines       32155    32155           
=======================================
  Hits        21968    21968           
  Misses      10187    10187           

@jenshnielsen jenshnielsen merged commit 27d7ef4 into microsoft:master Jan 2, 2023
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.

None yet

3 participants