unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pip Cet <pipcet@gmail.com>
Cc: 46881@debbugs.gnu.org, eggert@cs.ucla.edu
Subject: bug#46881: 28.0.50; pdumper dumping causes way too many syscalls
Date: Fri, 05 Mar 2021 09:54:41 +0200	[thread overview]
Message-ID: <83zgzixcfy.fsf@gnu.org> (raw)
In-Reply-To: <CAOqdjBdztYrqL6iU5+N72ATk7-7bzvnFOpqkFwc3u7mZRQgSqQ@mail.gmail.com> (message from Pip Cet on Fri, 5 Mar 2021 07:38:27 +0000)

> From: Pip Cet <pipcet@gmail.com>
> Date: Fri, 5 Mar 2021 07:38:27 +0000
> Cc: Daniel Colascione <dancol@dancol.org>, eggert@cs.ucla.edu, 46881@debbugs.gnu.org
> 
> > I'm not sure I understand: what's wrong with fseek?
> 
> Nothing, assuming you're fine with the current performance. Many libcs
> aren't going to be smart enough to avoid I/O when you fseek through a
> "large" file and write a word here and there, and my suspicion is that
> would include glibc.

Could we benchmark the two implementations instead of acting on
suspicions?

In general, I'd prefer not to reinvent the wheel, and trust modern
libc's that they are efficient enough in handling buffered streams,
unless we have hard evidence to the contrary.  If nothing else, it
would prevent people asking, like Daniel did, why didn't we use stdio
in the first place.

> Also, we're not currently using fseek-and-write anywhere in Emacs.

I don't see why this would be important.  Since we open the file in
binary mode, fseek should work correctly even on non-Posix systems.
Am I missing something?

> We're talking about a file which Emacs is going to have to keep in
> memory anyway, when reading the dump. The only case in which there
> might be a problem is if the build machine has significantly less
> available memory than the machine we intend to run on, and I just
> don't think that's going to happen.

You are thinking about memory consumption, while I am thinking how to
avoid implementing our own private buffered streams.





  reply	other threads:[~2021-03-05  7:54 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83zgzixcfy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=46881@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).