From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Tue, 14 Dec 2021 19:31:58 +0300 Message-ID: References: <87tufmjyai.fsf@gnus.org> <87lf0nr2b4.fsf@gnus.org> 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="37933"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 To: Lars Ingebrigtsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 14 17:34:03 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 1mxAkd-0009bv-CO for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Dec 2021 17:34:03 +0100 Original-Received: from localhost ([::1]:47008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxAkb-0004QF-I4 for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Dec 2021 11:34:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxAjc-00038X-Jj for emacs-devel@gnu.org; Tue, 14 Dec 2021 11:33:00 -0500 Original-Received: from [2a00:1450:4864:20::234] (port=44742 helo=mail-lj1-x234.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxAjZ-0005hC-Vs for emacs-devel@gnu.org; Tue, 14 Dec 2021 11:32:59 -0500 Original-Received: by mail-lj1-x234.google.com with SMTP id 13so29056162ljj.11 for ; Tue, 14 Dec 2021 08:32:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DCOmLIhrgQeAogSWmAVEF2eJRTU0Xj07l3hpMWoDTsw=; b=D9bALacrNl8lo7sp4hZqXiptEVqOKkmBetf6xKdA5duWQfNA3b49YD2vxupBoinze0 bQSybs58U7YDw1CJcCnJGigEgMYP04cqRp+K6Ns120ivbcEuTELluyLdNuxFzoCqVKYb tH6ValuUF/NQjMklHyYskY/9ORkIz0hdAXDtD9TWbPjhdo4l8ejhVI1nOxi3eTgZ4lkC Wd/j654aC0x9AxdgstmxXeDXn6K9S0//TFtZujzBivAkNGH7giVeyWsX1MxsfUou5B2u HmHZsAWWu3xMmOhUoYdAJH5Pg9jBPwxWcETALgFSP20bTddeUhfxdzlfad0MoBlDqpsT 9xQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DCOmLIhrgQeAogSWmAVEF2eJRTU0Xj07l3hpMWoDTsw=; b=Bkj5W6ibYrXDzThq3+hlfK+2JsWHlhsFpbifX+d5hVG6wfuGAZ3+QpUx6RhaaWVlcM FaVROiB19eNFIJdX6b+Ltaorb8VpTo76PxwI9oDJeYUBxWSu1loNbxXjG6mcfHrSblzi E2vOoIpq/rr7tWg9MYP49F6PCrXbJRVEqECaQ3RNh0MwNT/w1FhH5C5GIkCfm9hnrB02 30glCQMElKT3WskmjRCkC8XWx5In4azaizin/bpWAsHhcjm1lf+scrK7RtYt68CYn1UP 9FG9tT9LtvIaGKmMJMJR0eq/rQdTLDsx+JjNH2lMD3s/Zw/LMjS0MSoUkWkVjwM1qUzy HCtQ== X-Gm-Message-State: AOAM530gEnNsJs9gugGreShxaCCvlge/4FGv6mkTrClvYncEwkuPx5da kK2CIH4bSpYCdGXlsvV2opkHpbD3z6c= X-Google-Smtp-Source: ABdhPJzLcVbertwblKPWRbsXJWeV3Z7DG4qn17l+GxMCecp7NzYiw3OPawt0fTDf3mIfTeSojUBIlg== X-Received: by 2002:a2e:874b:: with SMTP id q11mr5845301ljj.194.1639499576008; Tue, 14 Dec 2021 08:32:56 -0800 (PST) Original-Received: from [192.168.0.103] ([5.18.233.185]) by smtp.googlemail.com with ESMTPSA id b12sm34046lfb.146.2021.12.14.08.32.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Dec 2021 08:32:55 -0800 (PST) In-Reply-To: <87lf0nr2b4.fsf@gnus.org> Content-Language: en-US X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::234 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=raaahh@gmail.com; helo=mail-lj1-x234.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NICE_REPLY_A=-0.962, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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:281917 Archived-At: On 14.12.2021 11:57, Lars Ingebrigtsen wrote: > As for the sqlite part of this: My initial benchmarking of this was > wrong. I thought sqlite3 was going to be a real advantage for this > thing, since I'd benchmarked excellent performance (more than 50K > updates per second, for instance). But that's only when not committing > after every transaction, which we want to do here, really. I'm guessing just the ability to avoid committing after every transaction (do it on a timer instead, perhaps) might become an advantage at some point. But a "proper" database might give other advantages like a faster search in the loaded data (unless it's already "indexed" by using hash tables everywhere where they could be used). Or being able to read the data without loading the whole file into memory. Which, for certain scenarios and data sets, might be a bigger advantage than faster writes. > But it turns out that sqlite3 is actually slower for this particular use > case than just writing the data to a file (i.e., using the file system > as the database; one file per value). So multisession.el now offers two > backends (`files' and `sqlite'), and defaults to `files'. Does the latter scenario use as many files as you do 'COMMIT' in the former scenario?