Open memeplex opened 6 years ago
What OS are you running on? the terminal runs a command (https://github.com/facebook-atom/atom-ide-ui/blob/master/modules/atom-ide-ui/pkg/atom-ide-terminal/lib/pty-service/PtyService.js#L87-L133) to find the default shell before spawning, which might take some time
I'm testing it with ubuntu 18.04, the default shell should be bash. How can I avoid the shell look up phase so that I can report any improvement related to that?
If you create a .nuclide-terminal.json config file and set the 'command' field, it should skip the lookup and instead just read the file. see docs at https://nuclide.io/docs/features/terminal/#custom-shell
Cool, now it launches almost instantaneously, thanks! I wouldn't close this though since > 10 seconds is not a reasonable time to detect the default shell for a platform (I would have expected this to happen in a fraction of a second, wouldn't you?)
Also, why not adding a setting to the ide options instead of having to add an external file? Is there any technical difficulty with doing that?
reason that's in an external file is that this terminal is shared with Nuclide, which supports remote editing, where you would want to have the configured shell be specific to the host machine.
re: slow startup, how long does running getent passwd memeplex
take for you? we parse output of that command on Linux to get the correct shell
Fine. Could I help you finding the bottleneck in the shell checking code? I'm new to atom but an experienced programmer otherwise so I could debug/profile/inspect the code if you guide me a bit.
In the blink of an eye:
~/proj (master)$ time getent passwd carlos
carlos:x:1000:1000:carlos,,,:/home/carlos:/bin/bash
real 0m0,004s
user 0m0,001s
sys 0m0,003s
It takes it about 10 seconds to startup. Once it's running it can handle more or less demanding apps like htop without hassle, but startup time is unbearable.