From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Preview: portable dumper Date: Tue, 29 Nov 2016 21:02:56 +0200 Message-ID: <831sxurtwf.fsf@gnu.org> References: <047a67ec-9e29-7e4e-0fb0-24c3e59b5886@dancol.org> <83zikjxt1j.fsf@gnu.org> <727ccd66-3bc3-2a41-7d1d-ef6dae9f0d1e@dancol.org> <7A914757-B1A4-4EEE-9DF0-68EFDDA9A5DB@autodesk.com> <83k2bmxju3.fsf@gnu.org> <837f7mrvq8.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1480446261 20791 195.159.176.226 (29 Nov 2016 19:04:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 Nov 2016 19:04:21 +0000 (UTC) Cc: jwiegley@gmail.com, burton.samograd@autodesk.com, rms@gnu.org, emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 29 20:04:16 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBnhO-0004MD-O2 for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 20:04:14 +0100 Original-Received: from localhost ([::1]:38837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBnhS-0004ie-CC for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 14:04:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBngg-0004iM-DA for emacs-devel@gnu.org; Tue, 29 Nov 2016 14:03:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBngf-0000Db-Gr for emacs-devel@gnu.org; Tue, 29 Nov 2016 14:03:30 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBngZ-0000D2-9X; Tue, 29 Nov 2016 14:03:23 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1164 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cBngP-0005oT-Vm; Tue, 29 Nov 2016 14:03:16 -0500 In-reply-to: (message from Daniel Colascione on Tue, 29 Nov 2016 10:49:10 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209752 Archived-At: > From: Daniel Colascione > Cc: John Wiegley , rms@gnu.org, emacs-devel@gnu.org, burton.samograd@autodesk.com > Date: Tue, 29 Nov 2016 10:49:10 -0800 > > > Any memory dumper will always be more efficient than loading .elc. > [...] > Because you can't possible get away, in the ELC approach, from: > > 1) reading every damn byte of the file, and > 2) allocating memory for every object you read. > > Efficiency is always going to be at least linear in the size of the > "elc dump" --- super-linear complexity if you want read-circle. > > A memory dump is linear only in the amount of data you actually > access. Plus, there's no serialization or deserialization overhead. A > memory dump is also inherently gentler on the underlying system, since > we can use many of the pages unmodified (which makes them shareable and > trivially swappable), while every damn byte of the Emacs heap after > loading ELC files will be process-private dirty storage. Like I said: any memory dumper will always be faster. But having less functionality coded in non-trivial C is IMO an important goal, one we have been pursuing for quite some time, and for a good reason. Although it should be clear that any adequate C implementation will always be faster than an equivalent Lisp implementation. > I do not think the portable dumper is something that's so complex as to > not be worth the performance It's complex. I have read the patch. I do know my way in the Emacs internals. > especially since any lread implementation that's even close to being > acceptably fast is going to be very complex in its own right. Even if we accept your opinion on the necessity for changes in lread (and I don't think I agree), that is a one-off job.