After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 159078 - slow highlight
slow highlight
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-22 15:46 UTC by tom
Modified: 2008-11-29 06:26 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description tom 2004-11-22 15:46:36 UTC
on a screen with a lot of text my term seems to hang for a couple seconds
before it hightlights anything..

this can range from like 2 or 3 seconds to about 10 seconds..

Can highlight very fast in other apps.. gedit.. firefox..
Comment 1 Kjartan Maraas 2005-08-19 19:51:51 UTC
Can you reproduce this with later releases?
Comment 2 Benoît Dejean 2005-10-12 12:54:58 UTC
Yes i can with 2.10 and 2.12. The situation has improved since 2.8, that's true.
This doesn't happen everytime.

As testcase, i do the following :
- open a new terminal
- dmesg (300 lines)
- select the last 15 lines.

With uxterm, selection is immediate. With gnome-terminal, it takes from 0.5s to
1.0s to hilight.


There are also rare unreproducable cases with buffer with a lot text in where
hiliting can still take 20.s or 3.0s.
Comment 3 Christian Kirbach 2006-07-08 11:24:15 UTC
cannot reproduce with GNome 2.14

highlighting takes place immediateley

are you running a very slow machine?
Comment 4 Benoît Dejean 2006-07-08 20:13:34 UTC
Define slow. Even if i add a 500MHz computer, it should be enough to hilite some text as i would be able to play Quake 3 @ 60fps on it.

So no, i have 1GHz ppc and a 2GHz P4. It happens with terminal with full scrollback and especially in full screen
Comment 5 Behdad Esfahbod 2006-07-09 15:23:18 UTC
I can confirm this.  Is not predictable and takes some time to hit it, but I do from time to time.
Comment 6 Chris Wilson 2007-02-05 17:58:06 UTC
I suspect that vte's past behaviour of clearing and restoring the highlight (triggering a window invalidate) would not have helped.

Also bug 324246 seems relevant.
Comment 7 Mariano Suárez-Alvarez 2007-02-07 21:58:53 UTC
I can't reproduce this. Behdad, Benoît, tom: have you seen this lately? 

Note that bug 324246 was particularily noticeable when there were lots of URLs in the screen.
Comment 8 Benoît Dejean 2007-02-12 19:27:39 UTC
Reproducible with long lines
Comment 9 Chris Wilson 2007-02-12 20:16:34 UTC
Benoit, just so I'm clear on the specifics - do you mean selecting within a wide terminal or where a single line spans many rows?
Comment 10 Benoît Dejean 2007-02-13 22:31:06 UTC
exactly.
full screen terminal ~ 140x40
long lines, lines that wrap. like dmesg | tr -d "\n"
Comment 11 Mariano Suárez-Alvarez 2007-02-14 04:19:56 UTC
I can reproduce this by making a terminal huge, saying «dmesg | tr -d "\n"», and trying to select the end of the output.

Details, details, details! ;-)
Comment 12 Chris Wilson 2007-02-24 00:31:30 UTC
sysprof indicates that it's the vte_terminal_hilite_match() which is consuming all the cycles. We can improve things slightly by not updating the match during the selection-drag, and other tricks to reduce the number of times we recheck the match. However, we will always suffer at least one regex search before the button-click is processed.
Comment 13 Chris Wilson 2007-02-24 00:35:11 UTC
For kicks, I've committed this to vte:-

r1739: 2007-02-24  Chris Wilson  <chris@chris-wilson.co.uk>

	Bug 159078 – slow highlight

	Do not update the match hilite during a selection-drag.
	Record unsuccesful regex matches, so we can quickly determine whether
	the cursor is still inside the blank region.

	* src/vte-private.h:
	* src/vte.c: (vte_terminal_match_check_internal),
	(rowcol_inside_match), (vte_terminal_match_check),
	(_vte_terminal_set_pointer_visible),
	(vte_terminal_match_hilite_clear),
	(vte_terminal_match_hilite_show), (vte_terminal_match_hilite_hide),
	(vte_terminal_match_hilite_update), (vte_terminal_match_hilite),
	(vte_terminal_motion_notify), (vte_terminal_button_press),
	(vte_terminal_focus_in), (vte_terminal_focus_out),
	(vte_terminal_enter), (vte_terminal_leave), (vte_terminal_init),
	(vte_terminal_unrealize), (vte_terminal_draw_rows),
	(vte_terminal_paint):

Comment 14 Christian Persch 2008-05-29 19:54:58 UTC
->vte
Comment 15 Behdad Esfahbod 2008-11-29 06:26:59 UTC
Can't reproduce anymore.  Scrolling is still slow with such long lines, but selection is normal.