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 of source_info.mk() #220

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

Jrendl
Copy link

@Jrendl Jrendl commented Jul 3, 2024

Inspect.stack is a resource intensive call as it recursively gets all the context for every stack frame (see https://stackoverflow.com/questions/17407119/python-inspect-stack-is-slow). By only calling it once, I was able to cut the time spent in calls to the vsc.constraint decorator in half.

@mballance
Copy link
Member

Excellent observation, @Jrendl! Changes all look good and tests pass

@mballance mballance merged commit 5f79289 into fvutils:master Jul 3, 2024
1 check passed
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.

2 participants