Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Terminal emulator incredible slow to startup #260

Open
memeplex opened this issue Jun 1, 2018 · 9 comments
Open

Terminal emulator incredible slow to startup #260

memeplex opened this issue Jun 1, 2018 · 9 comments

Comments

@memeplex
Copy link

memeplex commented Jun 1, 2018

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.

@pelmers
Copy link
Contributor

pelmers commented Jun 1, 2018

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

@memeplex
Copy link
Author

memeplex commented Jun 1, 2018

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?

@pelmers
Copy link
Contributor

pelmers commented Jun 1, 2018

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

@memeplex
Copy link
Author

memeplex commented Jun 1, 2018

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?)

@memeplex
Copy link
Author

memeplex commented Jun 1, 2018

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?

@pelmers
Copy link
Contributor

pelmers commented Jun 1, 2018

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.

@pelmers
Copy link
Contributor

pelmers commented Jun 1, 2018

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

@memeplex
Copy link
Author

memeplex commented Jun 1, 2018

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.

@memeplex
Copy link
Author

memeplex commented Jun 1, 2018

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

@facebookarchive facebookarchive deleted a comment from sea51930 Jun 2, 2018
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

2 participants