diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-02-24 11:09:49 +0000 |
---|---|---|
committer | Chris Wilson <cpwilson@src.gnome.org> | 2007-02-24 11:09:49 +0000 |
commit | 00f2d286a7795004a8591742eab788f1ad424cec (patch) | |
tree | ea3a939a4714e3d1a1c318a7cc17c3efc8d62003 | |
parent | 414043d45fc2b51430557c4ac575651468ff9500 (diff) | |
download | vte-00f2d286a7795004a8591742eab788f1ad424cec.tar.gz |
cf Bug 410534 – Slow content scrolling, takes 100% of CPU. cf Bug 410463
2007-02-24 Chris Wilson <chris@chris-wilson.co.uk>
cf Bug 410534 – Slow content scrolling, takes 100% of CPU.
cf Bug 410463 – Poor interactive performance with multiple terminals
* src/vte.c: (vte_terminal_io_read):
Do not loop whilst reading in a backlog of child data - should
help prevent monopolisation of vte by a single child and make
vte more responsive to user input on slower computers.
svn path=/trunk/; revision=1743
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | src/vte.c | 43 |
2 files changed, 25 insertions, 28 deletions
@@ -1,5 +1,15 @@ 2007-02-24 Chris Wilson <chris@chris-wilson.co.uk> + cf Bug 410534 – Slow content scrolling, takes 100% of CPU. + cf Bug 410463 – Poor interactive performance with multiple terminals + + * src/vte.c: (vte_terminal_io_read): + Do not loop whilst reading in a backlog of child data - should + help prevent monopolisation of vte by a single child and make + vte more responsive to user input on slower computers. + +2007-02-24 Chris Wilson <chris@chris-wilson.co.uk> + Bug 159078 – slow highlight Do not update the match hilite during a selection-drag. @@ -3502,7 +3502,7 @@ vte_terminal_io_read(GIOChannel *channel, struct _vte_incoming_chunk *chunk, *chunks = NULL; const int fd = g_io_channel_unix_get_fd (channel); guchar *bp; - int rem, loops = 5; + int rem; gboolean active = FALSE; chunk = terminal->pvt->incoming; if (!chunk || chunk->len == sizeof (chunk->data)) { @@ -3513,34 +3513,21 @@ vte_terminal_io_read(GIOChannel *channel, rem = sizeof (chunk->data) - chunk->len; bp = chunk->data + chunk->len; do { - do { - int ret = read (fd, bp, rem); - switch (ret){ - case -1: - err = errno; - goto out; - case 0: - eof = TRUE; - goto out; - default: - bp += ret; - rem -= ret; - active = TRUE; - break; - } - } while (rem); - if (loops-- == 0) { - break; + int ret = read (fd, bp, rem); + switch (ret){ + case -1: + err = errno; + goto out; + case 0: + eof = TRUE; + goto out; + default: + bp += ret; + rem -= ret; + active = TRUE; + break; } - - chunk->len = sizeof (chunk->data) - rem; - - chunk = get_chunk (); - chunk->next = chunks; - chunks = chunk; - rem = sizeof (chunk->data); - bp = chunk->data; - } while (TRUE); + } while (rem); out: chunk->len = sizeof (chunk->data) - rem; if (chunk->len == 0 && chunk == chunks) { |