all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: Pip Cet <pipcet@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Cc: 46881@debbugs.gnu.org, eggert@cs.ucla.edu
Subject: bug#46881: 28.0.50; pdumper dumping causes way too many syscalls
Date: Fri, 5 Mar 2021 09:13:49 -0500	[thread overview]
Message-ID: <810bd1fb-dc9c-e65b-66cc-09324859569e@dancol.org> (raw)
In-Reply-To: <CAOqdjBfwT+-0ND0uLuPAsvJYD=KfT+De4rp5=zXRcb3rrxE++g@mail.gmail.com>

On 3/5/21 9:02 AM, Pip Cet wrote:

> On Fri, Mar 5, 2021 at 1:16 PM Pip Cet <pipcet@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.






  reply	other threads:[~2021-03-05 14:13 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 20:33 bug#46881: 28.0.50; pdumper dumping causes way too many syscalls Pip Cet
2021-03-02 20:45 ` Pip Cet
2021-03-02 21:07   ` Alan Third
2021-03-03  7:10     ` Pip Cet
2021-03-03 19:57       ` Alan Third
2021-03-04  7:25         ` Pip Cet
2021-03-03  5:51   ` Eli Zaretskii
2021-03-03  7:35     ` Pip Cet
2021-03-03 15:09       ` Lars Ingebrigtsen
2021-03-03 19:35       ` Paul Eggert
2021-03-04 22:26     ` Daniel Colascione
2021-03-05  2:30       ` Pip Cet
2021-03-05  7:19         ` Eli Zaretskii
2021-03-05  7:38           ` Pip Cet
2021-03-05  7:54             ` Eli Zaretskii
2021-03-05  9:54               ` Pip Cet
2021-03-05 10:23                 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-05 12:06                 ` Eli Zaretskii
2021-03-05 12:49                   ` Lars Ingebrigtsen
2021-03-05 13:23                     ` Eli Zaretskii
2021-03-05 13:16                   ` Pip Cet
2021-03-05 14:02                     ` Pip Cet
2021-03-05 14:13                       ` Daniel Colascione [this message]
2021-03-05 14:55                       ` Eli Zaretskii
2021-03-05 15:12                         ` Pip Cet
2021-03-05  9:35             ` Andreas Schwab
2021-03-05  9:41               ` Pip Cet
2021-06-15  9:25 ` Mattias Engdegård
2021-06-15 12:58   ` Daniel Colascione
2021-06-15 13:06     ` Eli Zaretskii
2021-06-15 13:17       ` Lars Ingebrigtsen
2021-06-15 13:25         ` Daniel Colascione
2021-06-15 13:30           ` Eli Zaretskii
2021-06-15 15:32         ` Mattias Engdegård
2021-06-15 22:44           ` Daniel Colascione
2021-06-16  8:00             ` Mattias Engdegård
2021-06-16  8:14               ` Lars Ingebrigtsen
2021-06-16  8:16               ` Pip Cet
2021-06-16 14:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=810bd1fb-dc9c-e65b-66cc-09324859569e@dancol.org \
    --to=dancol@dancol.org \
    --cc=46881@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=pipcet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.