You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
If they all use the same console window, why is powershell so much slower? Why does the OP experience different results? I can attest to cmd.exe being faster than powershell.exe for running multiple instances of another program.– GChufCommented Apr 7, 2023 at 8:35
-
Depends on which part of it is actually slower? PowerShell itself is slow to start up, but I'm not sure when the "other program" comes in, in your case.– grawity_u1686Commented Apr 7, 2023 at 8:39
-
"the other program" as you put it is just a binary that does something. The whole problem is that calling that binary through windows terminal or powershell is slower and hogs more resources than cmd. Hence the question how to make that faster.– GChufCommented Apr 7, 2023 at 8:45
-
Again, which part of it? Does the binary itself occupy more memory or take more CPU to perform the same task when it's run from within PowerShell, or does PowerShell just take longer to spawn the binary initially? Is it the binary, or the PowerShell process, or the Conhost/WindowsTerminal process that's using those resources?– grawity_u1686Commented Apr 7, 2023 at 9:00
-
I understand your question now. In my own experience, the binary performs the same. It's the (powershell/windows terminal)conhost process that takes a lot of memory, and a lot of time to start up.– GChufCommented Apr 7, 2023 at 9:07
|
Show 3 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_`
- quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>
[example](https://example.com)
<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. windows-7), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
default