[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] read-file: Avoid memory reallocations with seekable files.
From: |
Paul Eggert |
Subject: |
Re: [PATCH] read-file: Avoid memory reallocations with seekable files. |
Date: |
Tue, 03 Aug 2010 11:37:48 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 |
On 08/03/10 06:50, Giuseppe Scrivano wrote:
> if ((pos = fseek (stream, 0, SEEK_CUR)) == 0)
Surely this would be much, much slower if the file seeks slowly,
for example, if it is a tape drive.
It might be helpful to use fstat to find the file's type and size,
and to subtract the current file offset from its size
(for file types where st_size is applicable).
- [PATCH] read-file: Avoid memory reallocations with seekable files., Giuseppe Scrivano, 2010/08/03
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files.,
Paul Eggert <=
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Giuseppe Scrivano, 2010/08/03
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Paul Eggert, 2010/08/03
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Bruno Haible, 2010/08/03
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Paul Eggert, 2010/08/03
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Giuseppe Scrivano, 2010/08/03
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Paul Eggert, 2010/08/03
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Giuseppe Scrivano, 2010/08/04
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Giuseppe Scrivano, 2010/08/10
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Giuseppe Scrivano, 2010/08/18
- Re: [PATCH] read-file: Avoid memory reallocations with seekable files., Eric Blake, 2010/08/24