2014-03-02 4:56 GMT+01:00 Eli Zaretskii <eliz@gnu.org>:
> Date: Sun, 2 Mar 2014 01:44:27 +0400
> From: Aleksey Cherepanov <aleksey.4erepanov@gmail.com>
> Cc: Agustin Martin <agustin.martin@hispalinux.es>, 16800@debbugs.gnu.org
>
> 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