-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Unnecessary imports cause slower sage startup #10220
Comments
Attachment: trac-10220-speedup.patch.gz |
comment:1
I haven't run full doctests yet, so I guess this is needs work right now. I think it's good to go, though, modulo running doctests. |
comment:2
What is the actual speedup? |
Reviewer: Jeroen Demeyer |
comment:3
Works for me. |
comment:4
What is the actual speedup? |
comment:5
Replying to @mwhansen:
Statistically insignificant... |
comment:6
To really speed stuff up you have to eliminate all imports of a module. Easier said than done. |
comment:8
Should this be merged if it doesn't change the startuptime? |
comment:9
I agree with both robertwb and jdemeyer. When I test it, startup doesn't seem to go down significantly, though the top one or two entries from sage -startup are eliminated. I think the patch is helpful, but maybe doesn't go far enough to eliminate all imports of a package. This is interesting, since this patch eliminates the imports with a - next to them in my list of slowest imports in sage -startup. However, the overall startup time does not seem to diminish appreciably. I suppose other modules take the "-" places below so that startuptime doesn't really go down? Or is it that the modules are loaded anyway somewhere else, and loading a module a second time (even in a different module) is insignificant?
|
comment:10
I'm in favor of any patches that remove unnecessary imports, as it will make the import order (which is now a mess) easier to understand and actual speedups easier to achieve. |
Merged: sage-4.6.1.alpha3 |
Changed keywords from none to import startuptime |
comment:11
Replying to @robertwb:
As you wish :-) |
This ticket takes care of some unnecessary imports that were done at startup time instead of inside of functions. It takes care of some of the worst offenders when sage -startuptime is run.
CC: @robertwb @mwhansen
Component: performance
Keywords: import startuptime
Author: Jason Grout
Reviewer: Jeroen Demeyer
Merged: sage-4.6.1.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/10220
The text was updated successfully, but these errors were encountered: