Skip to content
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

Terminal: revive makes the terminal very slow to start #133964

Closed
bpasero opened this issue Sep 28, 2021 · 4 comments
Closed

Terminal: revive makes the terminal very slow to start #133964

bpasero opened this issue Sep 28, 2021 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders polish Cleanup and polish issue terminal General terminal issues that don't fall under another label verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Sep 28, 2021

Testing #133516

When having the setting enabled to revive terminals, I feel like the terminal needs seconds to open after a restart, vs. otherwise when not enabled.

@bpasero
Copy link
Member Author

bpasero commented Sep 28, 2021

recording (1)

@meganrogge meganrogge added the terminal General terminal issues that don't fall under another label label Sep 28, 2021
@meganrogge meganrogge added this to the October 2021 milestone Sep 28, 2021
@meganrogge meganrogge added the polish Cleanup and polish issue label Oct 6, 2021
@Tyriar Tyriar modified the milestones: October 2021, November 2021 Oct 27, 2021
@Tyriar
Copy link
Member

Tyriar commented Nov 2, 2021

I wonder how much of this is due to the shared process launching slowly, as opposed to reconnection which doesn't need to wait for that.

@Tyriar
Copy link
Member

Tyriar commented Nov 15, 2021

Revive does indeed take a lot longer than a regular reconnect.

Revive:

image

Reconnect:

image

@Tyriar
Copy link
Member

Tyriar commented Nov 15, 2021

Found the main cause, before attach to a pty happens there's a check for whether it's orphaned:

const [cwd, isOrphan] = await Promise.all([persistentProcess.getCwd(), persistentProcess.isOrphaned()]);

For freshly revived processes, there is no window to respond to the parent request so it waits for the barrier's 4000ms before resolving:

this._orphanQuestionBarrier = new AutoOpenBarrier(4000);

So, the fix for this this should trim off about 4 seconds of revive time.

@Tyriar Tyriar closed this as completed in f76b133 Nov 15, 2021
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Nov 15, 2021
@bpasero bpasero added the verified Verification succeeded label Nov 30, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders polish Cleanup and polish issue terminal General terminal issues that don't fall under another label verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@bpasero @Tyriar @meganrogge and others