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

A few more or less obvious fixes for speed of SasView startup #2275

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

rozyczko
Copy link
Member

From >30 sec down to ~5 sec.
numba related fixes suggested by @pkienzle + minor other import shuffling as suggested by startup profiles.

Copy link
Contributor

@krzywon krzywon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does what it says it does. I measured the time to open the main window and it decreased from 21.5 seconds running the main branch to 11.1 seconds for this one.

@gonzalezma
Copy link
Contributor

More modest gain in my Windows machine (from ~30" to ~18"), but still an improvement.

@pkienzle
Copy link
Contributor

Maybe src/sas/sascalc/pr/p_invertor.py as well?

@rozyczko
Copy link
Member Author

Maybe src/sas/sascalc/pr/p_invertor.py as well?

In the startup profiling (Win10, dev build), importing the inversion perspective takes less than 1%. I'll add it anyway.

Other external imports, e.g. from bumps import options take significantly more time (>12%). I'm looking at making this import lazy as well.

@rozyczko
Copy link
Member Author

importing bumps options can't be made lazy, since we need to display the default bumps minimizer name, meaning importing and querying the module at start time.
We could hard-code the initial value to LM but this is not pretty.
Leaving as is then.

Copy link
Contributor

@wpotrzebowski wpotrzebowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to the code seem harmless and it works fine on Mac

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.

5 participants