From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alexandre Garreau Newsgroups: gmane.emacs.devel Subject: Re: Against sqlite3!!! Date: Thu, 09 Dec 2021 08:12:53 +0100 Message-ID: <12908535.gTCiKFHhma@galex-713.eu> References: <87y24wfant.fsf@gnus.org> 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="2337"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 09 08:15:04 2021 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 1mvDdw-0000OG-Gn for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 08:15:04 +0100 Original-Received: from localhost ([::1]:46920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvDdu-0000rU-RD for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 02:15:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvDcF-0008RZ-Ed for emacs-devel@gnu.org; Thu, 09 Dec 2021 02:13:19 -0500 Original-Received: from [2a00:5884:8305::1] (port=36394 helo=galex-713.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvDbs-0004rV-Gw for emacs-devel@gnu.org; Thu, 09 Dec 2021 02:13:19 -0500 Original-Received: from gal by galex-713.eu with local (Exim 4.94.2) (envelope-from ) id 1mvDbp-000J0d-PB for emacs-devel@gnu.org; Thu, 09 Dec 2021 08:12:53 +0100 In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:5884:8305::1 (failed) Received-SPF: pass client-ip=2a00:5884:8305::1; envelope-from=galex-713@galex-713.eu; helo=galex-713.eu X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:281446 Archived-At: Le merkredo, 8-a de decembro 2021, 7-a horo kaj 11:19 CET Arthur Miller a=20 =C3=A9crit : > Lars Ingebrigtsen writes: >=20 >=20 >=20 > > David Engster writes: >=20 >=20 > >> Yes, and it's slow. The Gnus registry is saved/loaded this way, and > >> this has annoyed me for years. >=20 >=20 >=20 > > Yup. The Gnus registry would be well suited to use sqlite directly, > > though -- it's basically hand-maintaining a (large) database, and > > sqlite is a good fit for that. > >=20 > > That is, I don't think the new normal persistence method would be > > ideal > > for the registry. > >=20 > > But, yes, the Gnus registry is a good demonstration of why serialising > > hash tables to disk is unworkable in practice. >=20 > Than implement a way for Emacs to dump lisp objects to files faster. It > would be very useful for Emacs in general. >=20 > You will still have to serialize your gnus db to sqlite db, and write it > to disk via sqlite, so disk access will still be there. Well, I think, wrt writes, it=E2=80=99s impossible to go faster than just w= riting=20 plaintext. But sqlite is here to make *reads* faster, not writes. The=20 only way I can see to make writes faster without any form of serialization= =20 is just garbage collecting related data together, and directly dumping=20 memory onto disk, in a native but non-portable format, along with metadata= =20 about the native format, and specific implementations to decode it from=20 other platforms for each memory format. I=E2=80=99d love to see that. But= I=20 think writing is not the bottleneck that we try to improve here.