Subject: bug#77089: [PATCH] Simplify Eshell history de-duplication

From: John Wiegley <[email-masked]>
Date: Mon, 17 Mar 2025 18:35:21 -0700

>>>>> "MS" == Morgan Smith <[email-masked]> 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