bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] =?iso-8859-2?Q?RE: performace issues when saving a http i


From: Hrvoje Niksic
Subject: Re: [Bug-wget] =?iso-8859-2?Q?RE: performace issues when saving a http iptv stream on a SD car=
Date: Sat, 18 May 2013 01:13:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

address@hidden writes:

> I am really curious what the rationale behind the fflush was.

The rationale was the data is not of much use to anyone while lingering
in Wget's stdio buffer.  No one else sees it, and if you only press ^C,
you lose it permanently.  Wget is not asking for the data to be
immediately written out to disk, it is merely handing it off to the
operating system, so other programs (be it tail -f or a locally running
browser) can see it and put it to good use.  fflush != fsync.

Plus, typical stdio buffer is smaller than Wget's network read buffer,
so most of the data would have been flushed anyhow.  The fflush() only
makes sure that by the time Wget announces that it has downloaded (say)
123,456 bytes of data, your file contains no *less* than 123,456 bytes.

If some misconfigured system were really neglecting to cache filesystem
writes, then it would have problems with most programs out there, not
just Wget.  After all, BUFSIZ on a typical system is only 4-8K.



reply via email to

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