From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Preferred approach to inclusion of data in ELPA package Date: Sat, 19 Aug 2023 15:51:48 +0000 Message-ID: <87bkf3vxm3.fsf@posteo.net> References: <28956ffc-6cc0-1f39-a26b-1453b48d61b1@hugot.nl> <878ra91ie7.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34774"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Hugo Thunnissen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 19 17:52:43 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 1qXOFn-0008kc-QI for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Aug 2023 17:52:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXOF6-0006Y9-7f; Sat, 19 Aug 2023 11:52: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 1qXOF3-0006Vs-1c for emacs-devel@gnu.org; Sat, 19 Aug 2023 11:51:57 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXOEz-0000jZ-1v for emacs-devel@gnu.org; Sat, 19 Aug 2023 11:51:56 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0BCF7240104 for ; Sat, 19 Aug 2023 17:51:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1692460311; bh=jM1O86rlYJqRX16yZIi0wv8bao2ARAmMwljLZncFQZg=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=f2ONEK5p/dgnMA52gYY+EPt+K6joibg20ALKTfr69wkavSObpwAMNtdrvKQhJ+WuY oAFqofJCxW3yTarWxtq5dtDqhTlSmN5w6gUFecXtPJcrVHmSE+QLVLZ0yTnViTdVsq 1A37QPp8y3A7Lw0ubLY6fBQNM8iHK/t/ZZQud6SRJHHMKoZe+Eg1urlKoV7/WAMeRk s4lFwx5s92fcdTCoDS+oxuaeVm6AiudjVYGzN4k7w+DxFRfcj30So2TE3AmUaG8hit 0XPSDX6Mb50EhOkNqIYJoRfhtIWYrFLTakp/b5HLyBIQDnP3P/65h5oTwB6tmpm/dI 8jvR2m9/XF7mg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RSjsf3Sdkz6trs; Sat, 19 Aug 2023 17:51:50 +0200 (CEST) In-Reply-To: (Hugo Thunnissen's message of "Sat, 19 Aug 2023 13:26:30 +0200") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:308939 Archived-At: 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. > Some more context, as I built and bench-marked a prototype: The > resulting index file is 3.1MB of s-expressions=C2=A0 which when compressed > with gzip becomes a file of 172K (there's a lot of duplicate > symbols/strings in there). Loading this file takes about 30% less time > than building the index from scratch (300ms vs 430-450ms on my laptop > with Core i5-8250U, byte compiled). I suppose this could be further > optimized with a more efficient serialization format, but I don't want > to spend much time on implementing that as I'm working towards an > initial package release. > > How would having a Makefile like you suggest work in practice? Would I > need to request that the ELPA maintainers add my Makefile to the build > process of my package somehow? Or is there a standard automated way to > have Makefiles be executed during an ELPA build? An ELPA package specification can include :make and :shell-command queries, that are executed on the ELPA build server, with restricted permissions. If you take a look at https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/elpa-packages and their respective repositories, you will find a few examples. > 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.