Subject: bug#29321: Isearch hit count

From: Juri Linkov <[email-masked]>
Date: Tue, 30 Oct 2018 01:31:25 +0200

> OK, I applied the new patch.
>
> Here's my feedback, in case it helps.
>
> For my own code, after the update search seems very slow.
> Just mentioning that - not that it's relevant.

It is slow when you set lazy-highlight-buffer to t
at the same when isearch-lazy-count is t because
adding overlays to all matches in the full buffer
is very slow and it slows down the counting of matches
that is preformed in the same loop.

Maybe for optimization we should run the matches-counting loop
first and only after that the full-buffer highlighting loop?

> Dunno how much this helps.  I again applied the patch
> manually.  I've attached the resulting file - perhaps
> you can diff it against what it should be, to see if
> it is faithful or I made a mistake.  That might save
> us some time, if I did make a mistake.  I don't want
> to provide misleading feedback.

I see that your version misses an important change in
isearch-lazy-highlight-new-loop.  So for your convenience
I attached below a complete patched isearch.el.

> Less relevant - just personal opinion: I prefer the
> numbering in the prefix form CURRENT/TOTAL, rather
> than the suffix, I think.  But I could change my mind.
> What are the reasons you prefer it as a suffix - or is
> it just better in terms of implementation/performance?

I have no preference.  For example, Chromium displays the
count as CURRENT/TOTAL whereas Firefox as (CURRENT of TOTAL).
So I changed back to CURRENT/TOTAL in the prefix here: