From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Mon, 06 Dec 2021 15:13:03 +0100 Message-ID: References: <87tufmjyai.fsf@gnus.org> <875ys2lyt0.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="550"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Po Lu , Lars Ingebrigtsen , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 06 15:24:50 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 1muEv9-000AQ0-8i for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 15:24:48 +0100 Original-Received: from localhost ([::1]:45862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muEv8-000402-Bj for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 09:24:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEjv-0005M4-Ft for emacs-devel@gnu.org; Mon, 06 Dec 2021 09:13:11 -0500 Original-Received: from mail-oln040092074095.outbound.protection.outlook.com ([40.92.74.95]:2070 helo=EUR04-DB3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEjs-0000pB-Ty for emacs-devel@gnu.org; Mon, 06 Dec 2021 09:13:11 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bDQ+GQcE3tHw7hMmPCBHG3IWAB0ckvXQixRK4fDPNt2cw3jHvb4AM8hSYBKVLe3uNfjmK+est8niUhCATd2XJTStgZ6TLyKyBCBx3nvzE1RdzF7IaN/rZk77v+fiQqit8uckEcVtQOnOiadkb7cIXrCkQtpuxxUs9mIZ2Rv6ViGXgyvfHovK0XcoVbloRM7sVKehnQsWBFfeKOhXbC3UChTYT3lxf83ACd3D2qOuWKT5RBlKbd2GOz7nwlucjZ474QoJ+ExSRvSBHPC0/2XwzVTJ1HtMXEOL9S5SrbvadsAiPEeE24K10K4UfA3QSeI+WqGCZOftsPLw6W2bPVqOkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r8On+pfwgppd2Ex6V1JDGAP1YKffJZvZw1+TwMiQOGc=; b=RuVyxB5FgSsZ1LBNlA9plQ2yOWZx49murKvv56kHxrU9PzHkgXLAg9tUSdZkjicAD90ukyf5NBazrnysyD+2pyOO7skWsBwPP8LeX99kFSC4+vPvhyCIZYtkZ65KleZZkzbBTUVVyZQZgS9qwjWYZXw6L5ugZfDMkO0R8WYzasS1zBGrAHYQ5znipXt6y0KRaiqtzJPN7GFfer4xc7ViPVB1knRjDOu6GxWeQGIv4Sn3vbjRcjvpQgGeIQ4VEvvB9PtA+x2AKCzWaA5h/sLY8UFY1jzDK3VmDZ8abt/Tbda1o9nBXR512TS6EEzCoBVlTmkwxFQBHCR+SdmVtC6ykA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r8On+pfwgppd2Ex6V1JDGAP1YKffJZvZw1+TwMiQOGc=; b=ISJNq5mwzxt7z/ZjXqfRRnxsYVpfzOacF6Hymw6Km3RGCF5ST9Cb3i8x7Iy7KQlQf29pNZTE2F7k8UhMsNsgyeZbnOAsM0IQX2wJdqv/qNB/Prc/Y3PemYeNNsZ2H7bGF6jg6WkBEkUxfcDdcsqlyLIiq6Wfa4fv5Fxom/JHcoczc1elC9ND5kciE4XgWWQeMx9WUK+/P7OCQNqiEyb1EiJko35GOertyoLEbo4DSEe98NKzzt1ibQ3lU15JGWmzCeSYaa9OH8s8EuNBGuGX3EuIFJwHsgHxZDN9XyuVPS4DVBNsgsFDio+YK1HetOMbi/b79VS5W+k8uxdRQfVbxg== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM0PR09MB3220.eurprd09.prod.outlook.com (2603:10a6:208:16a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.19; Mon, 6 Dec 2021 14:13:03 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b012:5fd9:9447:d64a]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b012:5fd9:9447:d64a%4]) with mapi id 15.20.4755.021; Mon, 6 Dec 2021 14:13:03 +0000 In-Reply-To: (Stefan Monnier's message of "Mon, 06 Dec 2021 08:34:15 -0500") X-TMN: [bv3afuTDi9XV0MmB6n4/CpP5I8wHG+fR] X-ClientProxiedBy: AS9PR06CA0378.eurprd06.prod.outlook.com (2603:10a6:20b:460::18) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87mtldakk0.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AS9PR06CA0378.eurprd06.prod.outlook.com (2603:10a6:20b:460::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.11 via Frontend Transport; Mon, 6 Dec 2021 14:13:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c9d65e7e-7686-416f-59d1-08d9b8c2846a X-MS-TrafficTypeDiagnostic: AM0PR09MB3220:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H2gTWNtYc4P+LYXYAtkLshItR7gSEv+YQDZY2Z+VHzCX6SOZkNTFN988BOFI/wRuZJzAga9T8ArCTFR38Ri6C1vCqIQyWHPWUe3jFM+GtPbeyslZ1+3BJCrC11NbO+aZK+WCyixScgqribCtitmuox4VK4tht1hmk/O9dOJloHfC1Iqm6Yafyk/OcLDlQZX1eL2sPDJXZ/c/SRwIBkHnUyZZQLTM0bY1OQAaUgeEa/kTrmHtMnn4uzCOIn03Dg4d+BA3SCG/Zwxda+SOz4vIpH5puiDOMhUAFUZTGBv12/HyZPP9X3KbfAkq8XZibHmj2oVTc8QXBFXmeYSlByUMhiIIozef/i8NVzsNq4f9VRU+DYSG2lW2fsbgHjLHjXwvIeiEY62Gj8TRdch0JeaNN73uPq6MqovTkHquySfAEtjRedtn/rEfIQBAiGvcBeoOujQlNDRSR18unTcUsVdhSvIsliYn/SCzr2bGc7O0aca8pFXq5+KAAhTXlNsFaXFpNfO2aBxJatZre/ibwGu4fKQBK5W0XVM/wWmSzzQWbRZtWR2hUsiy3t1sxlaubpq8u6AgFPXwhjimyOKG+JjAng== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qI/nrN3QkXINDg3046RqYOrX+SCXcrznrxKZJPp+2PRO6EqOw+VLZEI5nC15?= =?us-ascii?Q?F4lLdpKMj22JfPP2VwJofn2T29WOJ5mIfmJn0H0P8oXVPzU5BwifPg4APPLw?= =?us-ascii?Q?c7/bogs/rHlpF2dETjTkUZWXqtLHRU68loj8ZEQZqn+Uu2R6+mK5vyc/VgyN?= =?us-ascii?Q?74evfwM7LFIodvczzvjhYRmV0toaHL3KjJzGFyc+jZfAD6LOGrxO7j+P5NWG?= =?us-ascii?Q?tvLMYSY55ka31LnJ1KDNGAg2Cq/W0VknO5V3CuPKrclZylfWORfvWoIadw7T?= =?us-ascii?Q?mctWRNm5LKaL6NDYQg6ltZQaeGyMnJtYRDYQYEbbnxjH6ebICOOfPIuHdjWx?= =?us-ascii?Q?n908Zp97aK0gjrVMquBfWxG7GR6X8zBBY2I09kTsGi0PzhfgBV5MkASx3nCp?= =?us-ascii?Q?LU0rg91p0exW8eY8gWKKe2b/8eU2kHWvBCz8Mwsq3OlE+0yCcTFqH1vRnXtk?= =?us-ascii?Q?8Vz7jtBVaahvfy15wzpdhkKlBhoi3Asb4/2qf1EIgBJVVPGvb9ietcwYE4sQ?= =?us-ascii?Q?Dh6mSPn43TcVnNab/Fbf4PLEcXGCBd3ZZX6mNzDoARu716R28/rNYHKhRO6l?= =?us-ascii?Q?hUNJs7OvmFJPpqT1xdj0r8QBNHMtuvlQCwHbofnVEzsw8LWPRAGYoOEPHqEy?= =?us-ascii?Q?0g X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: c9d65e7e-7686-416f-59d1-08d9b8c2846a X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2021 14:13:03.8282 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR09MB3220 Received-SPF: pass client-ip=40.92.74.95; envelope-from=arthur.miller@live.com; helo=EUR04-DB3-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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.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:281119 Archived-At: Stefan Monnier writes: >> I suggested hashmap serialzied to/from file. I used such approach myself for >> key-value pairs. It worked fine for me, it was quite simple to read/write >> it. Currently I am testing a thing, and I use just assoc list to read/write it >> to a file, and it works fine for me too. > > The problem with this approach (which is the standard solution currently > in ELisp) is that it works OK for simple cases but breaks down when: > - there's a lot of data. > - the data is modified by several Emacs sessions at the same time. > This second case is what can happen with `ecomplete` or `savehist`. I wouldn't be surprised, if several processes are involved, if that is what you mean with several Emacs sessions at the time, than some locking is needed of course, and sqlite is a winner there. I believe.