GNU bug report logs -
#46881
28.0.50; pdumper dumping causes way too many syscalls
Previous Next
Reported by: Pip Cet <pipcet <at> gmail.com>
Date: Tue, 2 Mar 2021 20:35:01 UTC
Severity: normal
Found in version 28.0.50
Done: Mattias EngdegÄrd <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 3/5/21 9:02 AM, Pip Cet wrote:
> On Fri, Mar 5, 2021 at 1:16 PM Pip Cet <pipcet <at> gmail.com> wrote:
>>> I say let's go with stdio.
>> Maybe setbuffer(3) could help us here? I could run some benchmarks for
>> that if the idea isn't out of the question.
> Actually, calling setbuffer() with a large buffer will make glibc
> reread the entire file on every fseek(), rendering the dump so slow I
> gave up and interrupted it.
>
> However, there's open_memstream: that would have the added advantage
> of actually making glibc write out the entire file in one go, so it
> seems to shave a few extra milliseconds off the build.
>
> (However however, glibc's memstreams are somewhat broken. I'll file a
> bug report if there isn't one already...)
>
> Still, that way we could use stdio today, leave the buffering to
> glibc, and hopefully be able to switch trivially to a "open this file
> but keep it in memory" combined memstream/FILE* one day.
You could also use fopencookie to make your own stdio stream that does
the right thing while still using the stdio abstraction in the part of
the code actually doing the writing.
This bug report was last modified 4 years and 34 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.