From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Native compilation: the bird-eye view Date: Tue, 02 Jun 2020 11:16:46 -0400 Message-ID: References: <83o8qocd32.fsf@gnu.org> <83ftbzdewp.fsf@gnu.org> <83blmndbpo.fsf@gnu.org> <838shrdb1c.fsf@gnu.org> <837dxbd93b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56340"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , Paul Eggert , emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 02 17:18:23 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jg8gI-000EWI-06 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 17:18:22 +0200 Original-Received: from localhost ([::1]:50772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg8gG-000356-U8 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 11:18:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg8es-0001P4-NI for emacs-devel@gnu.org; Tue, 02 Jun 2020 11:16:54 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:62229) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg8eq-0006o4-GJ; Tue, 02 Jun 2020 11:16:53 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 89BDE100311; Tue, 2 Jun 2020 11:16:50 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 62D00100091; Tue, 2 Jun 2020 11:16:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1591111008; bh=6vy1toW+eryGajD6OHTo9V4ZW61W6djJ0BU2zfFI2dM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BVGfQmGU9QUmmcxK7YT08vvtMwVZ787y/O19cJpnRmY+NAAq+pqsKmF+XfFHYkN9B taLuuE86Tyv2+KPtnlnCiLvhpL4JxBLr3IzbyuujjIySoTY42LmENd+dm/Lximm0cL xWN6tb2uKcyNWZ8xKgkwKJ++mM/msiSESaT3Ho9Pm3QwGyHalBA4F0DNSB+8GztdxV x6Cj6zU8knrE3IdkMgnxHygfPqKcwvGXz3vfZRFATVnb3DRW8Qajtbs55h0AMQbApD ZSR+hu7WJI5wPW8R5vK7XsdgimFUVUIu0psTTw3QSQLRJgVpxnpON4BoVwBPU4SR/m xlmP9oT/p+C+g== Original-Received: from alfajor (76-10-137-254.dsl.teksavvy.com [76.10.137.254]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 11849120554; Tue, 2 Jun 2020 11:16:48 -0400 (EDT) In-Reply-To: (Andrea Corallo's message of "Tue, 19 May 2020 16:25:52 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/02 09:42:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251757 Archived-At: I see you haven't gotten much feedback about this yet, so I'll chime in. > Currently a .el file is compiled as: > /bar/foo.el => /bar/eln-x86_64-pc-linux-gnu-d241bf45dde51f21/foo.eln > where the directory name eln-... disamiguates architecture triplet and > Emacs version/configuration. > > One option would be in case to fall back in deposing the eln in something > like: > > ~/.emacs.d/eln-cache/bar/eln-x86_64-pc-linux-gnu-d241bf45dde51f21/foo.eln > > Both the directories would be added into the effective load path during > load if existing. This is OK but doubles the length of the effective `load-path`. Another option would be to use ~/.emacs.d/eln-cache/eln-x86_64-pc-linux-gnu-d241bf45dde51f21/.eln where is a hash of the corresponding .el(c) file name. Similarly, instead of /bar/foo.el => /bar/eln-x86_64-pc-linux-gnu-d241bf45dde51f21/foo.eln we would store those compiled files to a "global eln-cache" /bar/foo.el => /usr/lib/eln-cache/eln-x86_64-pc-linux-gnu-d241bf45dde51f21/.eln So we'd have a `eln-cache-path` where to search for those files and when loading a file we'd first look for the .el file in `load-path` and once found, we'd look inside `eln-cache-path` to see if that file has a compiled version available. `eln-cache-path` would be expected to be short (2 entries in the typical case). Stefan