GNU bug report logs - #77089
[PATCH] Simplify Eshell history de-duplication

Previous Next

Package: emacs;

Reported by: Morgan Smith <Morgan.J.Smith <at> outlook.com>

Date: Mon, 17 Mar 2025 22:35:04 UTC

Severity: normal

Tags: patch

Full log


Message #8 received at 77089 <at> debbugs.gnu.org (full text, mbox):

From: John Wiegley <johnw <at> gnu.org>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 77089 <at> debbugs.gnu.org
Subject: Re: bug#77089: [PATCH] Simplify Eshell history de-duplication
Date: Mon, 17 Mar 2025 18:35:21 -0700
>>>>> "MS" == Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

MS> I was noticing a perceptible delay in starting eshell of 0.838 seconds.
MS> Turns out it was because I had `eshell-hist-ignoredups' set to 'erase and
MS> I had a 5000 line shell-history file.

MS> This patch speeds it up for me to 0.011 seconds.

This is great, I didn’t realize this about ‘delete-duplicate-lines':

  Identical lines need not be adjacent, unless the argument
  ADJACENT is non-nil (interactively, with a C-u C-u prefix).
  This is a more efficient mode of operation, and may be useful
  on large regions that have already been sorted.

So it should accomplish just what the original intended to do, but relying on
a likely better optimized function.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




This bug report was last modified 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.