From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Skipping unexec via a big .elc file Date: Mon, 24 Oct 2016 07:45:17 -0700 Message-ID: <8c085c3e-361d-7d10-6f34-07c387eb3b43@dancol.org> References: <87eg51ng4r.fsf_-_@users.sourceforge.net> <87k2djwumn.fsf@users.sourceforge.net> <83h98nidvd.fsf@gnu.org> <87eg3rvtsf.fsf@users.sourceforge.net> <83k2dihpm9.fsf@gnu.org> <8760p2wzgj.fsf@users.sourceforge.net> <838ttyhhzu.fsf@gnu.org> <871szqwu51.fsf@users.sourceforge.net> <831szqhbc2.fsf@gnu.org> <87d1itt79z.fsf_-_@users.sourceforge.net> <7baa18d4-2b09-caa8-005e-29008a383ad1@cs.ucla.edu> <83mvhwrgd5.fsf@gnu.org> <8539f38f-9a11-44c3-4de7-bb974c96206c@cs.ucla.edu> <8360ojpndr.fsf@gnu.org> <83shrnm0k1.fsf@gnu.org> <83insi5jy9.fsf@gnu.org> <83mvht50qb.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1477323064 22781 195.159.176.226 (24 Oct 2016 15:31:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2016 15:31:04 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 24 17:31:00 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 1byhD8-0004Fv-KP for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2016 17:30:51 +0200 Original-Received: from localhost ([::1]:47436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byhDA-0007jG-ME for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2016 11:30:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bygVD-0002Fj-Tz for emacs-devel@gnu.org; Mon, 24 Oct 2016 10:45:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bygV9-000416-MT for emacs-devel@gnu.org; Mon, 24 Oct 2016 10:45:27 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:37024) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bygV9-00040W-D7; Mon, 24 Oct 2016 10:45:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=p+N+TJJ5RcNw5RQT238Aplz0bkIYV3GmXzlxkgAbuRc=; b=l3tUtImZLzJNUSUgxfXmkA2dnDdZ2yoqFeuYdwRtW7yOGIBSN9gvviV3OlqcoKBuWB3SdPp2puQfj+4S6H8esba0MqAh25TpqzsFGdHP459cgBVNlHCFBlVPmCp8KwUg+3rjCckKZ2/nlNNEt8OEja1L7TzbzVV9aB3kdX5SAtHjIwZAhkl4Jd1r7rA7o6IHuC5nc3dT2D7J8X4r18H7bjMEgtvT8HfRzgNGSWQ6OQVjgVzk/MhEtzhsK+jXUVgI9Ulb5HM2JJpyfUkXnlWBOv5I9wc0yLLeerUuwJUwoqrYiJvitLBfJ6ItkVBHvqQ9QZiHEHROWoGz48dfXn5mmA==; Original-Received: from c-73-97-199-232.hsd1.wa.comcast.net ([73.97.199.232] helo=[192.168.1.173]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bygV6-0003xM-In; Mon, 24 Oct 2016 07:45:20 -0700 In-Reply-To: <83mvht50qb.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:208692 Archived-At: On 10/24/2016 06:35 AM, Eli Zaretskii wrote: >> From: Stefan Monnier >> Cc: emacs-devel@gnu.org >> Date: Mon, 24 Oct 2016 09:04:29 -0400 >> >>> A small price to pay for the advantages, IMO. >> >> I think some users will run away screaming if Emacs takes a whole second >> to start up. > > It depends. If those users, like me, have hundreds of buffers in > their sessions, and use desktop.el to recreate their sessions, they > already wait a few seconds for that. > > And I don't expect the result to be 1 sec, that's is a rounded up > value that is already higher than what I saw. > >>> The most important advantage in my view is that the dumping/loading >>> process becomes very simple and understandable even by people with >>> minimal knowledge of C subtleties and Emacs internals, >> >> Yes, the benefits are clear, but the cost is pretty steep. > > We will have to speed this up, of course. You didn't expect tossing > unexec to be an easy job, did you? > >> I think we could live with a 0.2s startup time, but that's already >> a pretty high cost: >> - 0.2s feels sluggish when you expect "immediate". >> - byte-compilation has historically moved from "do it in a single >> session", to "start a separate Emacs session for each file" for good >> reasons. A 0.2s startup time imposes either a much slower >> byte-compilation, or will compel us to go back to "do it all in >> a single session". > > I think you forget parallelism. We build Emacs with several > compilations running in parallel for a long time. And byte-compiling > a typical file already takes more than 0.2 sec, sometimes (often?) > significantly more, so I don't see a catastrophe yet. > >>> This would make future maintenance much more robust and reliable, and >>> also allow more contributors to work on improving, speeding up, and >>> extending the build process. The alternatives all require us to >>> depend on a dwindling handful of people, which is a huge disadvantage >>> in the long run. >> >> Maybe there's indeed a lot of speed up still waiting there, and by >> reducing loading time of .elc files (and/or allowing more laziness there) >> we could bring down the 0.96s to 0.2s *and* speed up other uses at the >> same time. > > That's my hope, yes. E.g., maybe reading the startup.elc file could > run in another thread? > > In any case, I don't think it's right to throw out this idea without > trying very hard to make it work, because the benefits are so clear. I'm worried that it'll be deemed to "work" at a level of performance much worse than what we have today. My preference would be to keep hammering on this approach and others until we find something with only minimal performance regressions. I don't see the unexec maintenance situation being desperate enough that we need to accept a big performance loss.