From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Native compilation: the bird-eye view Date: Mon, 10 Aug 2020 09:23:56 +0000 Message-ID: References: <83o8qocd32.fsf@gnu.org> <83ftbzdewp.fsf@gnu.org> <83blmndbpo.fsf@gnu.org> <838shrdb1c.fsf@gnu.org> <837dxbd93b.fsf@gnu.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15270"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Eli Zaretskii , Paul Eggert , Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 10 11:24:45 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 1k542v-0003sI-B0 for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Aug 2020 11:24:45 +0200 Original-Received: from localhost ([::1]:36968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k542u-0005Tf-5v for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Aug 2020 05:24:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k542R-00054W-20 for emacs-devel@gnu.org; Mon, 10 Aug 2020 05:24:15 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:49408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k542O-0008Lc-QR; Mon, 10 Aug 2020 05:24:14 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 07A9Nu9x014591; Mon, 10 Aug 2020 09:23:56 GMT In-Reply-To: (Stefan Monnier's message of "Wed, 03 Jun 2020 10:38:19 -0400") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/10 05:24:06 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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:253578 Archived-At: Hi all, so I did some experimentation on moving the eln into a cache directory. ATM I've something that works this way: Compiling Emacs elns are produced into a dedicate folder in the source tree as emacs/eln-cache Inside there is another directory level to disambiguate triplet and Emacs configuration: ~/emacs$ ls eln-cache/ x86_64-pc-linux-gnu-f618cbdb0cd39c5f Inside we have the eln files: ~/emacs$ ls eln-cache/x86_64-pc-linux-gnu-f618cbdb0cd39c5f/ 4Corner-6622083dd2e93eda9a23ab8fb261bfd716e557cd3f955484db09a43143948f77.eln 5x5-cf035056577934b61cfe135fec6b6c67af96dd8378fa341ecd6a1b68ee789f48.eln abbrev-e1c1055cee82bacc9771ef6694dd80578cd97e869a489b42ff5b74ca8e00cbb6.eln abbrevlist-9cb12f8701f1f34beea0fbf333c35a3643bdec0691490b8fd70579ec26904723.eln add-log-4a4d094c86ae3143226b9e64aab356b7ced423a8c9b72b2156f75117b4ae1a66.eln ... I left the original name for comodity at the beginning and the hash afterwards. We could enconde in this hash also triplet and configuration to remove one directory layer but I thought is more handy for the user to have the eln divided this way. Anyway, these elns are the one produced during the build, so the one that will be installed in a sys directory. As a consequence I've added a second eln-cache directory for the compilations produced during normal use placed like ~/.emacs.d/eln-cache (well the exact value is computed using `user-emacs-directory'). This implies that during a load we check if the file exists first in the eln user directory and then if necessary in the system one. I'd like to get some feedback if you guys think this schema makes sense or you see some issues. Another question I have: do you think would be accettable at (first) startup to create the eln user directory and populate it with sym links for each eln file pointing to the eln in the system eln-cache directory? This way we could save one file look-up and simplify the code given we would point always and only to the user directory. Thanks! Andrea -- akrl@sdf.org