Subject: bug#4511: 23.1; flyspell-mode slow editing near end of big html file

From: Stefan Monnier <[email-masked]>
Date: Tue, 22 Sep 2009 17:40:03 -0400

> I track the slowness to where `sgml-mode-flyspell-verify' does

>     (looking-back "<[^>\n]*")

> I take it this func is asking whether point is within a <tag> or not.
> Does that regexp end up asking re-search-backward to consider every "<"
> in the buffer or something, before deciding no match is possible?

Yes, looking-back is a dog.  You need to pass it a `limit' argument.
I think the `limit' argument should be mandatory.

        Stefan