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

Temporary Console very slow #2744

Closed
Hypernut opened this issue Jun 6, 2020 · 6 comments
Closed

Temporary Console very slow #2744

Hypernut opened this issue Jun 6, 2020 · 6 comments
Labels
Issue-Performance Something's slow. Resolution-Inactive Will close automatically.

Comments

@Hypernut
Copy link

Hypernut commented Jun 6, 2020

Issue Description

The temporary console is very slow compared to the "normal" integrated console.
I don't now if that is a new issue or known, I did not use the temp-console until recently.

Running the following code:

(Measure-command {
    $List = New-Object System.Collections.Generic.List[object]
    for ($i = 1; $i -le 50000; $i++) {
            $Obj =  New-Object Psobject -Property ([ORDERED]@{
            A = $i*223231
            B = $i*4345353
        })
        $List.add($obj)
    }
}).totalSeconds

Takes:
Integrated Console: 4,4 Seconds
Temporary Integrated Console: 76,1 Seconds

I have tried the latest preview of the extension, same result.

Attached Logs

Follow the instructions in the README about
capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.17134
VSCode 1.45.1
PowerShell Extension Version 2020.4.0

PowerShell Information

Name Value
PSVersion 5.1.17134.858
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.17134.858
BuildVersion 10.0.17134.858
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
ayu teabyii 0.18.0
Bookmarks alefragnani 11.2.0
code-runner formulahendry 0.10.0
markdown-preview-enhanced shd101wyy 0.5.10
material-icon-theme PKief 4.1.0
material-theme zhuangtongfa 3.7.1
particle-vscode-theme particle 1.12.0
php-debug felixfbecker 1.13.0
php-intellisense felixfbecker 2.3.14
powershell ms-vscode 2020.4.0
powershell-preview ms-vscode 2020.6.0
python ms-python 2020.5.80290
python-preview dongli 0.0.4
vscode-ipython pancho111203 0.5.0
vscode-language-babel mgmcdermott 0.0.27
xml DotJoshJohnson 2.5.0
@ghost ghost added the Needs: Triage Maintainer attention needed! label Jun 6, 2020
@SydneyhSmith
Copy link
Collaborator

Thanks @Hypernut this could be because of the cacheing that occurs in the integrated console that does not in the temporary...does this repro in a fresh start of VSCode (making the integrated console as "fresh" as the temporary console)?

@SydneyhSmith SydneyhSmith added Needs-Repro-Info and removed Needs: Triage Maintainer attention needed! labels Jun 9, 2020
@Hypernut
Copy link
Author

Yes it does.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jun 12, 2020
@Hypernut
Copy link
Author

Hypernut commented Jun 12, 2020

But it seems the issue is more complicated than just "normal console" vs. "temp console".
When running the code via the debugger, it is slow no matter what.
Copying the code into a console and runnng it, results in the times posted above.

And btw. the slowness is not limited to any kind of specific code, I created the example above because I noticed all my script ran considerably slower in VSC than ISE or the standalone console.

@ili101
Copy link

ili101 commented Jun 14, 2020

But it seems the issue is more complicated than just "normal console" vs. "temp console".
When running

The Windows 10 + Debugger + PowerShell 5.1 is a different known bug PowerShell/PowerShell#10269
You can upgrade to PowerShell 7 to workaround as it doesn't look like the fix is going to be back ported to PS 5 any time soon

@Hypernut
Copy link
Author

Hypernut commented Jun 15, 2020

Could be. But an upgrade to v7 is out of the question. We have huge repositories of scripts running all over the place. This would take weeks, even months of compatibility testing to get this (maybe) approved.

Update: I just realized that the bug you linked is a year old. If the security fix that caused that, was rolled out a year ago as well, than this cant be the problem, because we would have felt the effect earlier.

@SydneyhSmith SydneyhSmith added Issue-Performance Something's slow. and removed Needs: Maintainer Attention Maintainer attention needed! labels Jun 18, 2020
@ghost
Copy link

ghost commented Jul 3, 2020

This issue is being closed as inactive, if this issue is still occurring it will be re-opened

@ghost ghost added the Resolution-Inactive Will close automatically. label Jul 3, 2020
@ghost ghost closed this as completed Jul 3, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Performance Something's slow. Resolution-Inactive Will close automatically.
Projects
None yet
Development

No branches or pull requests

3 participants