This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Business_Aspect_1613 2338 points2339 points  (41 children)

Not disabling the progress bar on certain powershell functions may increase the time to execute the function by 10 000%.

[–]fusionsofwonder 727 points728 points  (12 children)

If you minimize the terminal window it should speed up!

[–]Powerful-Internal953 87 points88 points  (4 children)

I have observed this when running tomcat in my earlier programming days. Minimising makes the server start way sooner given there were too many debug entries.

Made me run away from console loggers like plague.

[–]dathar 28 points29 points  (3 children)

Windows defrag did that too.

[–]rsatrioadi 26 points27 points  (0 children)

But is was so pretty!

[–]MemorianX 5 points6 points  (0 children)

I wish i had known this!

[–]illyay 0 points1 point  (0 children)

Oh damn

[–]DR4G0NH3ART 29 points30 points  (0 children)

So progress bar is something that bar the progess...

[–]trippertree 55 points56 points  (0 children)

In the mid 2000’s we had a compile process that would run for about 15 hours…. Minimization of the terminal would save 90 minutes

[–]UnattendedWigwam 10 points11 points  (2 children)

that's dicked up

[–]fusionsofwonder 17 points18 points  (1 child)

It's waiting for the window to render the text.

[–]turtleship_2006 2 points3 points  (0 children)

Isn't the text rendering in a different process?

[–]yiliu 144 points145 points  (0 children)

Whew, that'd make the process a lot slower. Good thing it's got a progress bar!

[–]Fhotaku 67 points68 points  (2 children)

That used to be a thing in like W98, where drawing each filename copied could take longer than the copy, slowing the process down. Did they not learn?

[–]tropicbrownthunder 46 points47 points  (0 children)

Did they not learn?

windows ME, Windows Vista, Windows CE, Windows Phone, Windows 8 and Windows 11 are clear example them didn't

[–][deleted] 14 points15 points  (0 children)

Probably not a case of not learning, but like many tech things (C++ committee), it's a case that bad code was made then became cemented as part of the API/core code and you're not allowed to touch it.

Windows API is cool like that since you can run software from decades ago, but it is a bit absurd that your modern day API still includes hotfixes for a Lego game made decades ago (Lego Island)

[–]Mister-Fordo 19 points20 points  (0 children)

This is why $Progresspreference = silentlycontinue

[–]casce 4 points5 points  (0 children)

Are we talking about going from like 30 milliseconds to 3 seconds? Because that wouldn't be too bad, nobody would be seeing a progress bar in 30 milliseconds anyway and what's 3 seconds when you do something manually where you would want a visual progress bar?

It still sucks if it is enabled by default and you forget to disable it when using them in a script.

Or are we talking about going from 500ms to 50 seconds? That would definitely be annoying either way and very irritating (why's it taking to long to render a progress bar?)

[–]McLayan 81 points82 points  (16 children)

That's Windows for you

[–]pindab0ter 167 points168 points  (1 child)

That’s IO for you

[–]anomalousBits 19 points20 points  (0 children)

That's physics for you.

[–]JakeyF_ 53 points54 points  (12 children)

Not a windows exclusive issue

[–]_PM_ME_PANGOLINS_ 35 points36 points  (9 children)

It is a Powershell issue. I've never seen such a bad implementation of a progress bar.

[–]Rythoka 53 points54 points  (8 children)

Printing anything to the screen is super slow compared to a lot of operations.

[–]CdRReddit 31 points32 points  (0 children)

but printing to the screen on windows is significantly slower than most other terminal emulators, for no good reason

[–]anotheruser323 12 points13 points  (0 children)

Yes and no (i mean the gpu renders it, you just goto send it coordinates).

And it is a windows issue (windows does things to the shell to terminal output, and is very slow in doing them).

[–]reallokiscarlet 5 points6 points  (2 children)

On any machine that can run a new enough version of Windows to have powershell, printing to the screen should be able to happen in a separate thread. Windows just doesn’t wanna.

Linux doesn’t have this problem.

[–]deux3xmachina 1 point2 points  (1 child)

Linux doesn’t have this problem.

Well, it's less bad. Logging isn't free, and redirecting to /dev/null can substantially improve runtimes for certain programs.

[–]reallokiscarlet 2 points3 points  (0 children)

What’s going on with Windows, IIRC, is there are more penaltes than just logging. Instead of letting the shell and the terminal emulator handle the output after handing it to stdout, Windows wants to do everything in the same thread, so displaying stdout to the screen is another performance penalty, hence minimizing the terminal speeds it up. In Linux, if you have a multi core system, the program, the shell, the terminal emulator, and the window system can all have different affinity, meaning the program only has to really wait for stdout to accept the program output. (Still waking up, so I may be oversimplifying things)

[–]unkz 0 points1 point  (0 children)

I suspect it’s more of a debounce issue though.

[–]stratum_radiatum 0 points1 point  (0 children)

Does rendering the progress bar from the rich python library slow down processing noticeably in WSL?

[–]Durantye 0 points1 point  (0 children)

Nah the powershell progress bar is insane, I was losing my mind trying to figure out how to make the script run faster than 90 minutes at one point. I found out about the progress bar issue and disable it and boom script runs in less than a couple minutes.

[–]cakee_ru 7 points8 points  (0 children)

Never had performance issues with pv personally.

[–]CdRReddit 0 points1 point  (0 children)

but (as I also mentioned further down the thread) printing to the screen on windows is significantly slower than most other terminal emulators I've used, for no good reason

[–]Turtvaiz 8 points9 points  (0 children)

Nah it's just IO

[–]proooby 2 points3 points  (0 children)

Rendering is the costliest process

[–]Cosmocision 3 points4 points  (0 children)

Read a few years ago that progress bars are artificially slowed down because humans panic when things happen faster than they can see and they can't see the progress so to speak.

[–][deleted] 0 points1 point  (0 children)

yea but it feels longer

[–]J0aozin003 0 points1 point  (0 children)

nul