From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hugo Thunnissen Newsgroups: gmane.emacs.devel Subject: Re: Preferred approach to inclusion of data in ELPA package Date: Sun, 20 Aug 2023 21:24:26 +0200 Message-ID: References: <28956ffc-6cc0-1f39-a26b-1453b48d61b1@hugot.nl> <878ra91ie7.fsf@posteo.net> <87bkf3vxm3.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38910"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 20 21:25:37 2023 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 1qXo3N-0009vM-AP for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Aug 2023 21:25:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXo2m-00043v-QU; Sun, 20 Aug 2023 15:25:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXo2k-00041O-4W for emacs-devel@gnu.org; Sun, 20 Aug 2023 15:24:58 -0400 Original-Received: from mailtransmit05.runbox.com ([2a0c:5a00:149::26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXo2g-00007M-B2 for emacs-devel@gnu.org; Sun, 20 Aug 2023 15:24:57 -0400 Original-Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1qXo2Z-00CvaE-Im; Sun, 20 Aug 2023 21:24:47 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugot.nl; s=selector2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=aOyqymxrl3i6S/70StaRBJ9lEu5qtlmGXFKolescd7s=; b=eY7VoysbRRxBK9rTShmsZgSjIP 68opcfCm9Vh+i8UvcDQhXRukRrg/9/kOxfAY3ekHVl+/xC8hV9WOiogD4OrqlRk89wKsvd3LSv64E 1aLLRSzyqHGqABoyTYIIFexQUuCuFtq46BOWXkSFUoqKrSES85X9cn9QgeVxTl40poWa25zjbTNbS aSg4iPmjk2xCrMuDCSIwDoDREMc/dMjrQUGpLjpVTVqeOM5mDgthAlDKrsKUhP5AnDpwc90AKHFt7 4cFvXNK4PNHKmG1n+GZQq/hDWwT/hAhYs4tN8ldOuRvjNgDud89lhwDO3Lrwlk21iS3D9RmBgHP7e sbbEzKuQ==; Original-Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1qXo2Z-0001tk-92; Sun, 20 Aug 2023 21:24:47 +0200 Original-Received: by submission02.runbox with esmtpsa [Authenticated ID (1060096)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1qXo2F-0000BL-O9; Sun, 20 Aug 2023 21:24:28 +0200 Content-Language: en-US, nl In-Reply-To: <87bkf3vxm3.fsf@posteo.net> Received-SPF: pass client-ip=2a0c:5a00:149::26; envelope-from=devel@hugot.nl; helo=mailtransmit05.runbox.com X-Spam_score_int: -70 X-Spam_score: -7.1 X-Spam_bar: ------- X-Spam_report: (-7.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-4.279, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308990 Archived-At: On 8/19/23 17:51, Philip Kaludercic wrote: > Hugo Thunnissen writes: > >> On 8/17/23 23:14, Philip Kaludercic wrote: >>> Another idea is to have a Makefile generate the file, like the one you >>> describe in option 2., that is generate whenever the package is built >>> and bundled into a tarball for distribution. That way you don't have to >>> store a binary blob in your repository, and you can avoid burdening the >>> user with additional computations at either compile or runtime. >>> >>> Does the generation require any special functionality/tools/code to be >>> provided on the device the index is generated on? >> The php function/class stubs are generated with a php script, but I'm >> checking the resulting stubs file into git. The index itself can be >> built with just my package based on the stubs file. > I saw that, and the commit did not look that nice, but I cannot say that > I have looked into the issue in sufficient detail to say with certainty > or not that there is no better solution. > There are alternatives or improvements to this approach, which I mentioned in my response to sbaug (https://lists.gnu.org/archive/html/emacs-devel/2023-08/msg00748.html) . I don't think I'll be able to get around having to distribute-, or having the user download/generate some kind of index though. > >> Also: If the former is the case, is the reduction in load time that >> this brings even significant enough to be worth the bother or should I >> just hold off on this while I look for a more efficient solution? > I'd say it would be worth it, if the resulting package would be smaller > and would load quicker. After all, the performance on your laptop might > not be that significant of a difference, while for someone else with an > older or slower device, a 30%-speedup is pretty significant. > You're right, on less performant systems it could make a more significant difference. And good news, after a few improvements the load time is now down to ~150ms on my laptop. I also chose to load the data when the mode is first initialized, so simply loading my package won't cause the index to be loaded with it. The dumping of the index is done automatically when it is not present, so it would technically be fine to just distribute the PHP stubs with the package instead of the .eld index file. This would just make the user wait a little longer the first time they use the mode.