Open slel opened 6 years ago
Indeed. This has been a problem for as long as I've been working on the Python 3 port, and it's not clear to me why. I suspect it has mostly to do with the import system. On the one hand, the new import system has some caching to reduce the number of syscalls needed for many import
calls. OTOH that cache has to be filled in the first place, and that might still be slower in the extreme case of Sage. I need to investigate this but haven't even started to yet.
see #8254
see rather #26908
Since #26908 this is vastly improved. Startup time is still a bit slower than on Python 2, but it's much more marginal, and it might be harder to track down any specific deficiencies in this area. Though I certainly wouldn't discourage anyone from trying.
I still believe there are big gains to be made in general with lazy imports. I don't think we need to really import everything that makes up the Sage global namespace if we can replace most of it with proxies.
Python3-based Sage seems to start up much slower than Python2-based Sage.
CC: @fchapoton @embray @saraedum @slel @williamstein
Component: python3
Issue created by migration from https://trac.sagemath.org/ticket/26482