-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
WT is relatively slow at executing cmd scripts at Windows startup #15001
Comments
Hi @vadimkantorov. Thanks for the feedback.
Yes! We definitely need to improve our startup/teardown performance. We're tracking this over in #5907, so we're going to mark this as a /dup of #5907.
As of now, no. The console hosting process model precludes us from doing this. However, there is a windows system feature that you can enable to audit process execution. This section from our FAQs may help out: https://github.com/microsoft/terminal/wiki/What-is-causing-consoles-to-pop-up-on-me%3F |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Is it possible to have some heuristics that delay full UI rendering specifically when it's running in unattended mode? Rendering of the UI / full Terminal systems bootstrapping is useless in these cases as the whole thing needs to exit in 500ms. E.g. ideally it should run |
I think that this specific usecase is not discussed in #5907 |
(from #9996) Maybe? But those scripts shouldn't be displaying consoles in the first place. Defterm handoff is pretty specific - if a script wanted a visible console window, it tries to do a defterm handoff (resulting in the Terminal UI). Any of the many ways to start a hidden / minimized / headless console application won't invoke a defterm handoff. So, a defterm handoff starting the Terminal headless is kinda besides the point here. Those apps either wanted to have a visible console window, or didn't bother hiding themselves on startup. Now, 1.18 does have an unrelated fix where it won't display the Terminal HWND at all till the UI is actually ready. So that should mitigate some "transparent terminal window frames that pop in and out of existence before the Terminal even appears". |
hmm... and in my case, these scripts somehow don't appear in sysinternals autoruns. I wonder if Terminal/cmd.exe (or maybe Windows in general?) has any simple way of logging all process executions (along with args)? that way at least I can give you a concrete example I agree that they shouldn't be displaying consoles, so probably some command line flags are missing to hide these windows. but if they show it anyway, i wonder if there's any way to speed up these UI's starting up / shutting down. Maybe Terminal launches first in headless mode, is it faster for all subsequent Terminals to start up / shut down? |
Sorry to give you a drive-by, but you might be served well enough on this point by https://github.com/microsoft/terminal/wiki/What-is-causing-consoles-to-pop-up-on-me%3F 😄 |
btw I used these two cmd commands in an elevated Command Prompt:
Then |
@DHowett btw how can I filter the Process Creation events in the Event Viewer? What should I select as |
That is an excellent question! Unfortunately, I am not particularly good with Event Viewer and I don't know how to filter those events adequately. |
I wonder if Terminal could have an option for logging to its own topic in Event Viewer logging, including its startup arguments |
Windows Terminal version
1.16.10262.0
Windows build number
10.0.22621.1413
Other Software
No response
Steps to reproduce
My Windows system somehow has some
*.cmd
logon scripts: Terminal/cmd windows get spun up and closed several times at Windows login.I could not find those scripts in Sysinternals
autoruns64.exe
, but they certainly get executed. My system is in a good shape, so it's not some virus etc.These scripts do not require user input and typically do not even print anything, but the time to open a WT window, render it and then close is relatively slow. So WT startup/teardown time is a whole different beast when the usecase are the logon scripts and the OS/disk is bombarded by tons of apps/services starting up in parallel.
Some questions:
Expected Behavior
No response
Actual Behavior
N/A
The text was updated successfully, but these errors were encountered: