bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invoking gunzip.exe


From: Matthew Woehlke
Subject: Re: invoking gunzip.exe
Date: Fri, 04 May 2007 17:02:19 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.0

Paul Eggert wrote:
Eric Blake writes:
Another benefit of making gunzip a full-blown executable rather than a
shell wrapper is that the startup time is faster (and on cygwin and mingw,
the extra process and time of a shell script wrapper is noticeable).

But no extra process is involved here; the shell script does not fork.

Uncompressing is a common task, and should not be artificially slowed down
because a shell script is in the mix when a binary could do the job.

The overhead is so small on my Debian stable host (with a 5-year-old
CPU) that I can't easily measure it.  Perhaps things are different on
Cygwin but I suspect in practice the overhead is relatively small
there, too.

If you're talking about fork(), the overhead of fork() on Cygwin is *NOT* inconsequential. If you're doing a lot of it, it can in fact be very, very nasty. The reason is that there is no such thing as fork() on Windows, so IIRC it is necessary to recreate the complete process space. It's like the bad old days before copy-on-write was standard AND you have to re-run all the process space initialization code.

--
Matthew
Current geek index: 62%




reply via email to

[Prev in Thread] Current Thread [Next in Thread]