-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Adopt utility process in terminal/pty host #175335
Comments
Here are some pointers how it works today with the shared process which I think is very similar to the PTY-Host, because:
1.)
|
Source: pty-host-20230330_2.tldr.txt |
One of the major differences between pty host and the shared process is that the pty host much exist in both the desktop client and the server, whereas the shared process is rolled in to the server process in remote. |
Actually the file watcher is similar: it exists both in desktop and on the server. On desktop we use a utility process to fork it from the main process and on the server we use a traditional node.js vscode/src/vs/platform/files/node/watcher/watcherMain.ts Lines 12 to 20 in efbdef2
|
Having some problems atm while trying to move the pty host service to the main process, the process it creates (still a regular node proc) fails to import node-pty. Not sure why yet |
It does import node-pty, and it works fine if I break where the |
Something that does happen immediately that is split up when stepping through is seamless relaunch due to extensions activating. |
Disabling seamless relaunch doesn't fix the problem |
I cannot break on this line: I can break on the line above: |
Everything works fine if I disable conpty |
Curious, did you end up having a |
I didn't end up trying the message port per terminal. There's a single message port per window, established here: https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts#L83 |
Follow up from #154050
We now have sufficient infrastructure in place to easily fork a
UtilityProcess
with support of message port communication to other processes:vscode/src/vs/platform/utilityProcess/electron-main/utilityProcess.ts
Line 121 in ed6bb07
Currently the PTY agent is still running as child process in the shared process housing all terminals:
vscode/src/vs/code/node/sharedProcess/sharedProcessMain.ts
Lines 386 to 399 in ed6bb07
We should consider moving the PTY agent out into a standalone utility process to reduce pressure on the shared process (and actually vice versa, reduce pressure on terminals).
The text was updated successfully, but these errors were encountered: