Subject: bug#16800: 24.3; flyspell works slow on very short words at the end of big file

From: Agustin Martin <[email-masked]>
Date: Sun, 9 Mar 2014 18:36:55 +0100

2014-03-02 4:56 GMT+01:00 Eli Zaretskii <[email-masked]>:

> > Date: Sun, 2 Mar 2014 01:44:27 +0400
> > From: Aleksey Cherepanov <[email-masked]>
> > Cc: Agustin Martin <[email-masked]>, [email-masked]
> >
> > We could try to limit execution time. Though checks for that could
> > slow down the search.
>
> Exactly.
>

I see other problem with that, it is not deterministic, since the limit
depends on system load.

I have mixed feelings about changing current default from unlimited, but I
slowly changing my mind towards having  a big but not unlimited value as
default.

On the one hand, not putting limits in default value looks nicer, but on
the other that may have a non negligible impact in performance for really
huge files, as Eli points out.

Alexey's one-liner is 30000 lines and 2.4e6 chars size. While new code
seems to work for it, I'd put the limit somewhere lower, no more than 1e6.
This should be huge enough for any practical use and for anyone to notice
the difference.

Regards,

-- 
Agustin