musl-cross-make icon indicating copy to clipboard operation
musl-cross-make copied to clipboard

Suggestion: Remove verbose extraction

Open Irchh opened this issue 5 years ago • 7 comments

Is there any reason to keep verbose mode on when extracting? As far as I'm concerned it just makes it take longer than it should.

Irchh avatar Aug 11 '18 15:08 Irchh

Not in particular, but it's just part of a general principle of not hiding visual progress indication.

I just measured and the time difference is miniscule here, 29.0s vs 27.7s. If it's slow for you, the slowness is probably a bad terminal that renders synchronously and blocks while rendering (all the gnome-vte based ones) and redirecting the whole build to a file or using a better terminal would make a huge difference compared to just saving time at extraction.

richfelker avatar Aug 11 '18 16:08 richfelker

Seems likely, but in my case it's probably because I'm using WSL. It's not exactly fast...

Irchh avatar Aug 11 '18 16:08 Irchh

I think it would make more sense to just print a message when extraction has started and finished. Alternatively, we could make the script print a dot (.) with no line break at the end for every file extracted, so that progress would still be visible somehow.

Calinou avatar Jul 15 '19 15:07 Calinou

you could simply use tar xf instead of tar xvf, @Calinou

rofl0r avatar Jul 15 '19 21:07 rofl0r

@rofl0r That can be done too, but I was answering @richfelker's concern about hiding progress (especially on slow machines).

Calinou avatar Jul 15 '19 23:07 Calinou

So piping stdout into some program that counts lines and prints a dot for each one? Something like this: tar -xvf gcc-8.3.0.tar.bz2 | awk '{printf "."}' would propably be fine then, and also wouldn't slow down because of 'bad' terminals like the gnome-based ones. With big codebases like gcc, only printing every 30+ files would probably be a good idea: tar -xvf gcc-8.3.0.tar.bz2 | awk '{if(NR%30==0)printf "."}'

(I have no idea what this will do to overall performance, but I can't imagine it doing much. I am not even close to any linux machine at the moment, so I can't test this)

Irchh avatar Jul 18 '19 08:07 Irchh

I don't think this is a speed issue but a noise issue. When you build musl-cross-make, the first 125 thousand lines of output are just from extracting archives. That's not meaningful information, that's just ~10MB of noise.

I would suggest removing the verbose flag from all tar commands.
If users really want to watch files be unpacked, they can use the TAR_OPTIONS environment variable to re-insert the verbose flag.

llamasoft avatar Jul 26 '22 21:07 llamasoft