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

simple executeSingleCommand need 6s #84

Open
bbscncom opened this issue Jul 4, 2023 · 2 comments
Open

simple executeSingleCommand need 6s #84

bbscncom opened this issue Jul 4, 2023 · 2 comments

Comments

@bbscncom
Copy link

bbscncom commented Jul 4, 2023

#6s
PowerShellResponse powerShellResponse = PowerShell
.executeSingleCommand("Get-CimInstance -ClassName Win32_Printer -Property Name|Select-Object -Property Name;");
#1s
Process exec = Runtime.getRuntime()
.exec("powershell.exe Get-CimInstance -ClassName Win32_Printer -Property Name|Select-Object -Property Name;");
#1s
powershell> ....

i try some commands,all need 6s. There seems to be a configuration error it spend 5s. i dont know what happen

@bbscncom
Copy link
Author

bbscncom commented Jul 4, 2023

3.1.1

@jenskreidler
Copy link

jenskreidler commented Sep 7, 2023

Trace it down in jPowerShell (debugger) - I could imagine that you've got a problem here. At least it was for me on unix.

In Java 9+, one can get the process PID in a better way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants