From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Skipping unexec via a big .elc file Date: Tue, 20 Dec 2016 13:57:26 -0500 Message-ID: References: <83shrnm0k1.fsf@gnu.org> <075B0922-F07A-4FBA-AE71-027E964A5ED4@raeburn.org> <54AAC13A-CF56-4393-A932-DC6CBBF51259@raeburn.org> <3CC6BB36-1794-4202-8243-132E0345B236@raeburn.org> <52BDCC33-546C-4F47-A230-00EBC813B038@raeburn.org> <15CF14CC-C7DE-44BA-AC7D-F0BF1F160979@raeburn.org> <9463F91F-DB82-48E1-BE01-1E2BC8DA0766@raeburn.org> <5b39d866-16ea-8cf1-f25e-6bfc3304ac2a@cornell.edu> <16B1EC9C-9BF7-432E-BE42-154740B04679@raeburn.org> <00AE6236-2C0B-4E2A-8A53-16A5C42D41A9@raeburn.org> <75C18644-F7C8-4164-BA46-CD73F4E39A93@raeburn.org> <83y3zh7ylv.fsf@gnu.org> <87pokorm48.fsf@russet.org.uk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1482260317 4455 195.159.176.226 (20 Dec 2016 18:58:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Dec 2016 18:58:37 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Phillip Lord Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 20 19:58:30 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 1cJPcK-00085s-KG for ged-emacs-devel@m.gmane.org; Tue, 20 Dec 2016 19:58:28 +0100 Original-Received: from localhost ([::1]:53002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJPcP-00086e-38 for ged-emacs-devel@m.gmane.org; Tue, 20 Dec 2016 13:58:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJPbU-00085m-CY for emacs-devel@gnu.org; Tue, 20 Dec 2016 13:57:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJPbP-0001lF-Oh for emacs-devel@gnu.org; Tue, 20 Dec 2016 13:57:36 -0500 Original-Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:34402) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cJPbP-0001kc-Jp for emacs-devel@gnu.org; Tue, 20 Dec 2016 13:57:31 -0500 Original-Received: by mail-qk0-x243.google.com with SMTP id t184so5686748qkd.1 for ; Tue, 20 Dec 2016 10:57:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=qUkHaXCT5uSWq5HTwcd+J8qI1wOwXM6PNfxIoOeYFKo=; b=kTd/76keTAmOIgR42x6c0EGKOhD2pAzbjtsaKmEJwpOjiZGliry41ItEt+1C6Ba6vP jtkoEr769ZDYq/iwPUgdCwkj1AxToaxQWtNtp+MyI28mRPVwuPcIGbtNJMBpIHKfKKbH eSBXhfz66ZAmbyTC6BrTwD9/nUiqJO732RX91AjtUjv3Y9O5bipEHCqQcto7+VrEQQg2 usJkRlcfg/LdcYszWI9wOZsSHRXJryjwT/8GO7TprukfarqVWm03EcEm6SCDR1HaeiSK dV03gwPfq3uB9cy1KnAxQqIWFJmmShncemb9wm3BYF8ihYDLvXyB1JEoIiE/ZSVo77sX +CFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=qUkHaXCT5uSWq5HTwcd+J8qI1wOwXM6PNfxIoOeYFKo=; b=PPTtZ2ph8Kj3unmfSQC8kOAYzw+89O8kIyx2lkkYBExZoLbjWKwYRBWz5z2aA9Rkqm zgTjJrX1mX9O9w+b2+B/nG2kzCQel1bR+I7AwjHNz73EU0wNabmINMSjKfx9YbEFYwHP 1TTMmoHdxeHf+hHaPgB3LWUQY5TUaUoc01oDFeDalxbpkSNC1fia/SFATzd+riN6cFm1 z0R7CwMRBHvJsGm8ro3m6p9OUWCFZTczcR+0Nc5EVtHsAPOzV6e+/itxJ60bGEoq/Th4 nB29Us4/h3EPC9wQj5Q8VX/M38oQRBVxN0jcgqPCtwkp95km9FJ5puJQJowldYbvEODh /a1w== X-Gm-Message-State: AIkVDXIauN4Vgjzzg7jzrD4GUlbdlbo3v46hxWgiie1f0VqJuTi7jIhQtx64XFMcYEkZow== X-Received: by 10.55.36.204 with SMTP id k73mr977715qkk.125.1482260249184; Tue, 20 Dec 2016 10:57:29 -0800 (PST) Original-Received: from [192.168.23.52] (c-50-138-183-136.hsd1.ma.comcast.net. [50.138.183.136]) by smtp.gmail.com with ESMTPSA id f7sm13632440qtf.48.2016.12.20.10.57.28 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Dec 2016 10:57:28 -0800 (PST) In-Reply-To: <87pokorm48.fsf@russet.org.uk> X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::243 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:210670 Archived-At: On Dec 19, 2016, at 10:09, Phillip Lord = wrote: > I looked at this a little and in fact the boot code that I have = written > does tell you exactly which autoloads you need to get temacs to work = -- > it's not very many, I think that there are only 10 or so (bytecomp.el > for instance). This sounds like it could be the biggest help for startup time at this = point. Are you going to look further into making a lightweight loadup = file? Looking at ldefs-boot.el and loaddefs.el, and contemplating the parsing = of them, I wonder: If we go the big-elc route, can we defer loading the = doc strings until they=E2=80=99re actually needed? Perhaps using the = =E2=80=9C(#$ . nnnn)=E2=80=9D syntax used in .elc files, or somehow = pointing at the real .el or .elc files defining the functions? Maybe = just omit the function doc strings, if the help code does something = reasonable in that case? I=E2=80=99ve still been poking at the reader code, but for small-ish = changes I think I=E2=80=99m hitting a point of diminishing returns. My = current test case run time is about 0.15-0.16s, though the run times are = short enough that minor system activity at the same time can affect the = results. I=E2=80=99ve got one more experiment in the works that cuts = almost 20% of the size of dumped.elc, and cuts the test run time to = about 0.14s. (Sharing interned symbols in the printer, so =E2=80=9Csetpli= st =E2=80=A6 setplist =E2=80=A6=E2=80=9D becomes =E2=80=9C#4=3Dsetplist = =E2=80=A6 #4# =E2=80=A6=E2=80=9D, drastically cutting into the 90% of = oblookup calls that are done for symbols already in the obarray, and the = related string manipulations, as well as the legibility of the generated = file.) After that, I think the next step is further specialization of = read1/readchar/read_escape/readbyte for the get-file-char case, and = maybe more tweaks to try to optimize for mostly-ASCII input. But those = result in more code duplication and additional maintenance work, for = probably small benefit, so they=E2=80=99re not looking all that = appealing. So, at this point, I=E2=80=99m inclined to finish my current experiment = with the printer, and maybe set aside work on the big-elc performance = for a bit, maybe look into threading bugs or the state of the = CANNOT_DUMP code. Ken=