Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Slow startup of Sage console #3

Open
embray opened this issue Aug 28, 2017 · 6 comments
Open

Slow startup of Sage console #3

embray opened this issue Aug 28, 2017 · 6 comments

Comments

@embray
Copy link
Contributor

embray commented Aug 28, 2017

When running the main "SageMath" shortcut it takes about a second for the Sage banner to even come up (maybe it's possible to display a message very early in the startup before the Sage banner). But even after the banner comes up it can take several seconds before the sage: prompt appears, especially on the first startup.

Need to investigate areas where Sage startup time can be improved (there's an already significant improvement in https://trac.sagemath.org/ticket/23711). But might also be good to insert a message that Sage is loading--maybe even a spinner--so it doesn't just look like it's frozen.

@profedrini
Copy link

On the notebook, the jupyter page opens relatively well, and then you can open a notebook.
But executing the first cell takes several minutes (even if it's just calculating 2+2)
after that, it behaves somehow normally

@embray
Copy link
Contributor Author

embray commented Nov 28, 2017

That makes sense--sage is probably not even imported before the first cell is run. It shouldn't take several minutes though. For me at worst it's a few seconds.

@nilqed
Copy link

nilqed commented Nov 28, 2017

Meanwhile I've seen more than a dozen of installations on various machines (Win7 and Win10) and didn't notice any unusual delay. Admittedly, it starts a bit quicker on Win7 but doesn't take more than 10 seconds on average. However, a colleague told me that he noticed very long startup times (> 5 minutes) if ConEmu is installed. It might be connected with https://conemu.github.io/en/ThirdPartyProblems.html or https://cygwin.com/faq/faq.html#faq.using.bloda. I can't say for sure if this applies here, however, I also experienced problems with cygwin64 (memory leaks) which magically disappeared after removal of AV software.
BTW this Windows version of sage is a blessing and will certainly be of great help promoting sage to a wider audience. Great job, thank you Erik :)

@embray
Copy link
Contributor Author

embray commented Nov 29, 2017

Yes, BLODA could have something to do with it. I use Windows Defender, but not any third party anti-virus software. Might be an interesting experiment to try (in a VM, of course--AV software can be (intentionally) harder to remove than some viruses :)

It remains a potential downside to relying on Cygwin. I still hope to work on minimizing the reliance on Cygwin for Sage's dependencies, but there are higher priorities so it's probably going to be around for some time to come.

@embray
Copy link
Contributor Author

embray commented Dec 11, 2017

I recently tried the notebook myself, and it took about a minute for the first command to run in the Sage kernel. BLODA shouldn't be an issue in my case, and my machine was also under very heavy load at the time (all CPUs busy compiling).

I'll have to see if I can profile what's going on when that first command is run. The most likely culprit is that importing Sage itself takes some time, but it should be possible to speed that up a bit by pre-importing it as soon as the kernel is started, or something...

@embray
Copy link
Contributor Author

embray commented Nov 6, 2018

This is still pretty painfully slow sometimes. I need to investigate what might be slowing it down so much. I suspect there might be a number of subprocesses being started just during Sage startup, which really we should try to put a stop to if at all possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants