From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46881: 28.0.50; pdumper dumping causes way too many syscalls Date: Fri, 05 Mar 2021 09:54:41 +0200 Message-ID: <83zgzixcfy.fsf@gnu.org> References: <83r1kw6b06.fsf@gnu.org> <90e99fc5-280d-63bb-9bc4-3efe89b9f9e2@dancol.org> <83a6riysnv.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14156"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46881@debbugs.gnu.org, eggert@cs.ucla.edu To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 05 08:56:30 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lI5K1-0003aR-Hm for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 08:56:29 +0100 Original-Received: from localhost ([::1]:51510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lI5K0-0004Ux-HN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 02:56:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lI5Ja-0004TH-0q for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 02:56:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lI5JZ-0001Bu-Ot for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 02:56:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lI5JZ-00073W-NV for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 02:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Mar 2021 07:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46881 X-GNU-PR-Package: emacs Original-Received: via spool by 46881-submit@debbugs.gnu.org id=B46881.161493090727055 (code B ref 46881); Fri, 05 Mar 2021 07:56:01 +0000 Original-Received: (at 46881) by debbugs.gnu.org; 5 Mar 2021 07:55:07 +0000 Original-Received: from localhost ([127.0.0.1]:60916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lI5Ih-00072J-6G for submit@debbugs.gnu.org; Fri, 05 Mar 2021 02:55:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lI5Ie-00071k-UJ for 46881@debbugs.gnu.org; Fri, 05 Mar 2021 02:55:05 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53251) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lI5IX-0000OO-QA; Fri, 05 Mar 2021 02:54:57 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1971 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lI5IX-0005oi-6t; Fri, 05 Mar 2021 02:54:57 -0500 In-Reply-To: (message from Pip Cet on Fri, 5 Mar 2021 07:38:27 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201504 Archived-At: > From: Pip Cet > Date: Fri, 5 Mar 2021 07:38:27 +0000 > Cc: Daniel Colascione , 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.