Re: [PATCH v2] Simplify maildir_delayed_parsing().

Rene Kita <[email protected]> Tue, 21 Jul 2026 06:22:14 +0200
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
On Tue, Jul 21, 2026 at 10:32:12AM +0800, Kevin J. McCarthy wrote:
> On Mon, Jul 20, 2026 at 03:10:28PM -0400, Kurt Hackenberg wrote:
> > Programmers are notoriously bad at guessing where software spends its
> > time. The standard advice is to *measure* speed if you're concerned
> > about it.
> > 
> > Applying that advice, I guess anyone tempted to remove this speed hack
> > should measure speed first, with and without the hack, in at least all
> > the cases above. And remember that disk drives and filesystems both have
> > cache. A lot of work...
> 
> Yup.  Personally, I would love to completely remove the sort.  It would
> make the function a lot cleaner.
> 
> But it would be a lot of work to measure.

As it complicates the code, I would argue that those who want to keep
the function should do the measurement. Kurt gave enough arguments why
this sorting is a questionable idea. But I also understand you being
cautious.

See also: https://xkcd.com/1172/ :-)