GNU bug report logs - #59787
29.0.60; Very slow pos-visible-in-window-p with long truncated lines

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Fri, 2 Dec 2022 20:10:02 UTC

Severity: normal

Found in version 29.0.60

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 59787 <at> debbugs.gnu.org
Subject: bug#59787: 29.0.60; Very slow pos-visible-in-window-p with long truncated lines
Date: Wed, 07 Dec 2022 09:58:40 +0200
> As reported in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56682#1977:
>
>   2. after starting Isearch at a large column number,
>      Emacs hangs up indefinitely, e.g. with
>      'M-g TAB 10000000 RET C-s' then even C-g doesn't get out.
>      Debugging shows that the problem is in 'isearch-update'
>      where the call to 'pos-visible-in-window-group-p' doesn't return.
>      When this call is removed, the search is instantaneous.
>      (Optimizing lazy-highlight is a separate problem in bug#56815.)
>
> The problem is that pos-visible-in-window-p starts from window-start point
> and goes to the POSITION passed as argument using move_it_to, which in this
> case is very slow, because it has all the 10000000 columns to traverse.
>
> The solution is to introduce shortcuts into pos_visible_p in this case.

Could you explain why pos-visible-in-window-p is instantaneous at any
position when long lines are not truncated.  Why it doesn't need to
traverse 10000000 columns in this case?




This bug report was last modified 2 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.