unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 30943@debbugs.gnu.org, cfindeisen@google.com
Subject: bug#30943: save-hist creates massive cache file
Date: Fri, 30 Mar 2018 11:14:13 +0300	[thread overview]
Message-ID: <83h8oyc756.fsf@gnu.org> (raw)
In-Reply-To: <imzi2qb0e4.fsf@fencepost.gnu.org> (message from Glenn Morris on Fri, 30 Mar 2018 01:25:23 -0400)

> From: Glenn Morris <rgm@gnu.org>
> Cc: cfindeisen@google.com,  30943@debbugs.gnu.org
> Date: Fri, 30 Mar 2018 01:25:23 -0400
> 
> Eli Zaretskii wrote:
> 
> > I actually find that to be a nuisance even for visiting files.  With
> > 64-bit builds, this warning makes very little sense.
> 
> 32-bit builds are almost dead, so you may want to revisit the default.
> (See trend at https://debbugs.gnu.org/stats/emacs.html )

Yes, I think we should significantly increase the default value of
large-file-warning-threshold.  I always enlarge it in my .emacs,
because the default is even small enough to allow me reading my email
without annoying questions.

> But isn't it about how much physical memory the system has?

That's one factor to consider, yes.  But even that is normally what?
8GB nowadays?  And VM is then 2 or 4 times that?

> The largest el(c) file in the Emacs sources is ja-dic at 2.2MB,
> well below the current default for large-file-warning-threshold.
> So not warning about loading a 1/2GB file like in the initial report
> seems like a disservice.

I wouldn't worry before it got 10 times that, but that's me.

Don't forget that before that file was about to be read, it was
written by the previous Emacs session, which means that previous
session already had all that loaded, and took more memory than that
file's size.  If the user was not worried about their running Emacs's
footprint, why should we annoy them with questions at startup time?

IME, these measures are only useful when they prevent some very grave
problem, like Emacs crashing or becoming completely unresponsive.  (We
had such problems years ago, when the 64-bit build still had bugs with
using integer types that overflowed at INT_MAX, and we indeed had then
tests to prevent users from crossing that border.)  Otherwise, I
personally would prefer _not_ warning about large files and let each
user find the point where it becomes annoying to them.  This is
because IME that point is highly individual, and depends on both user
preferences and the resources on their machine.  We can never do as
well with a fixed threshold, even if its value is somehow calculated
from the available data: there are too many unknown factors here.

Again, just my $0.02.





  reply	other threads:[~2018-03-30  8:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-25 19:11 bug#30943: save-hist creates massive cache file Chris Findeisen
2018-03-26 14:59 ` Eli Zaretskii
2018-03-27  2:50   ` Chris Findeisen
2018-03-27 19:44     ` Glenn Morris
2018-03-29 16:27       ` Chris Findeisen
2018-03-29 17:09         ` Eli Zaretskii
2018-03-29 18:08         ` Glenn Morris
2018-03-29 18:47           ` Eli Zaretskii
2018-03-30  5:25             ` Glenn Morris
2018-03-30  8:14               ` Eli Zaretskii [this message]
2022-02-15 10:29           ` Lars Ingebrigtsen
2018-03-27 19:12   ` Glenn Morris
2018-03-29 10:49     ` Eli Zaretskii
2018-03-29 17:12       ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h8oyc756.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=30943@debbugs.gnu.org \
    --cc=cfindeisen@google.com \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).