From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: Turning on savehist-mode by default Date: Sun, 17 Dec 2023 05:19:31 -0600 Message-ID: References: <461a0999-6005-4aa4-a4b3-988123855f92@alphapapa.net> <831qbll01p.fsf@gnu.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="7560"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: luangruo@yahoo.com, emacs-devel@gnu.org, sbaugh@catern.com, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 17 12:20:32 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 1rEpCA-0001hd-FC for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Dec 2023 12:20:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEpBL-0000js-NX; Sun, 17 Dec 2023 06:19:39 -0500 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 1rEpBK-0000h6-2D for emacs-devel@gnu.org; Sun, 17 Dec 2023 06:19:38 -0500 Original-Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEpBI-0003ed-8T; Sun, 17 Dec 2023 06:19:37 -0500 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 92F188411D2; Sun, 17 Dec 2023 11:19:33 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a209.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 27BCA8416A6; Sun, 17 Dec 2023 11:19:33 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1702811973; a=rsa-sha256; cv=none; b=+EdcPb5sBDhpqCm9fbf1SGgXbsdqO8iBa7SfNS3Jw9ZPyVVTPmCk0quVSk9XTMHefo+ybh rfkutrMZ5rOPP6mWfN8i+HzWJQw/iuJ4T/L6+pnAzchCmqhqdyeqwDaj8tTwfZ9Lz0Dpws 7iXT9J9WKPw5CrAHXReFAb4VFxY0ymnMQGN34GvJQYEpHT52c+Gerl4GAW3+74kUCoZodI AAu0QdnrwEO8gHZKx+Tvv8hRTq6gLkohcbdfQFOzmOXU+oToJSZtXzm/tabsavtevJtzQL U+iII5U0mbBDFR6slp1dQaH1S2wf5Vn/CsRmD7xV94vaAk4rGsuJEkxu4IFrFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1702811973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+JLInH5/QHRJ054DC82Etz1R9rahyzs6MZGW/byoQSg=; b=WhCM/00DchBPVn/WozJiQPnhF89K3E44ycvGWVpZCwTFVnkXE2/jSynKgJz+yzfB16YRik WlF3gTAvA+kIf7JTRtbdsnv6QfZOr4wkg9GYpVdw7pYeVGsd6THbI0Um/MwYm1atWasEQd 7sukTMNFfrpBRllB0GF4cR+nXU1f5/ZmPxdCcD2dej3iQk5+g2Lj+/tdB0M1QswrZ3PWna KCsptoEwkjjMAVv/XHSzAF/9phBM86URhKMCB3Al3PS14mMmUgGDxyrBNcmMu84DQvcGw6 fLONP4H/sha8G65rN4YYJpXPpOG/mSA8x76nZrIpW+tYzYJ/6R9H1zoEM0UYOg== ARC-Authentication-Results: i=1; rspamd-d8b88b4b9-6kzm4; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Interest-Vacuous: 4ef0e09f7cc31cbd_1702811973436_2004121320 X-MC-Loop-Signature: 1702811973436:1622801999 X-MC-Ingress-Time: 1702811973435 Original-Received: from pdx1-sub0-mail-a209.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.107.188.194 (trex/6.9.2); Sun, 17 Dec 2023 11:19:33 +0000 Original-Received: from [10.66.2.14] (unknown [91.193.232.98]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a209.dreamhost.com (Postfix) with ESMTPSA id 4StL841pSLz64; Sun, 17 Dec 2023 03:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1702811972; bh=+JLInH5/QHRJ054DC82Etz1R9rahyzs6MZGW/byoQSg=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=LBiAu0k57Uhy4+p42wgApdi9e7LwmLXgr+Gh2YtTSI0C/9drRJSgNcUaX8eNnJE9e 2esKKJybtub/Gg90YldZmde60C+sKIvwxe8RD/l2rHrn+g3EBjq0p9cqpORKWNYewl Z16qPah7CUlTLcyulaoFRsKQX9Y+8ZtCCfWJm1cSTVX/gFACe12xFZkCMNPsCm3mFI jsX5owAwBu4MqmrqVM0s3rgkt2MAWoy0DR05+PAJtGjk8S8unpVw/9Dwg7hvaN2YW+ X3icEI29P1EfaVH/aaspN8BgUyPVYHCR+JGl6tnQhhmhXulPRRVJ/e8p11rtaTOgZt AR1cJjF0ANakA== Content-Language: en-US In-Reply-To: <831qbll01p.fsf@gnu.org> Received-SPF: neutral client-ip=23.83.212.17; envelope-from=adam@alphapapa.net; helo=bird.elm.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313915 Archived-At: On 12/17/23 02:12, Eli Zaretskii wrote: >> Date: Sat, 16 Dec 2023 23:42:15 -0600 >> Cc: eliz@gnu.org, emacs-devel@gnu.org, sbaugh@catern.com, >> stefankangas@gmail.com >> From: Adam Porter >> >> In addition to what Po said, I'd like to gently reiterate what I said >> earlier in this thread: Given my experience with savehist causing >> unexpected and hard-to-debug performance problems[0] > > That mentions a single 3rd-party package that triggers the issue, and > includes a workaround solution. I see nothing awful there. From my perspective, as the developer of the package being accused of having performance problems by random users, problems I couldn't reproduce, nor even begin to guess what the cause was, or if it was even an actual problem, it felt pretty awful. >> I'd guess that there are more such cases in the wild waiting to be >> triggered. > > You know about other packages that add huge elements to history > variables? Which ones? My package does not add huge elements to history variables. It simply passes arguments to functions via their interactive forms. I didn't even know that such history variables existed until that bug report came to its conclusion, and I've used Emacs for years and published tens of packages which together have nearly a million downloads. So if it can happen to me, it can probably happen to anyone. >> If, e.g. Emacs 30.1 enabled it by default, I can imagine a number >> of users suddenly encountering weird pauses, and they'd probably >> blame GC initially[1]. > > This remains to be seen, and having this on master enough time in > advance will allow such reports to come in, if indeed such problems > exist. You may be right, considering how many users who build master have been speaking up lately. Still, my concern is that whether the problem happens depends very much on a user's established workflows and installed packages. Some users will never encounter the problem, and other users will encounter it constantly, and those who do won't have a clue what's going on, because it's heavily obscured. I don't know what sample size would be needed to be likely to detect such problems, but it wouldn't be small, given that probably 0.1% or less of the users of Ement.el seemed to experience the problem--but for those who did, it was crippling to their Emacs usage. > We could also introduce a limitation of element size (a defcustom) to > be imposed by add-to-history, if we think such long elements are > detrimental to performance. That would likely be necessary, yes. No one wants 450 MB savehist files in their .emacs.d getting rewritten every few minutes. >> As well, I have some concerns about savehist's having the potential to >> cause weird bugs in other libraries: The savehist-save function seems to >> comment out individual elements of savehist-minibuffer-history-variables >> that it determines are unreadable. That's understandable from its >> perspective, but what effect will that have on libraries that may not be >> expecting for their data structures to have certain parts disappear >> after restarting Emacs? I can just imagine the bug reports from users >> showing apparently corrupted or elided data structures, and having no >> clue as to what is mutating them, because the code isn't within the >> library having a bug reported against it. > > If such bug reports will come in, we will handle them. As we do with > any other Emacs feature. Why worry in advance, when we don't yet have > any such reports, and therefore can do nothing about them? I guess it's a matter of perspective--from mine, I'm sharing such a report.