summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-02-24 11:09:49 +0000
committerChris Wilson <cpwilson@src.gnome.org>2007-02-24 11:09:49 +0000
commit00f2d286a7795004a8591742eab788f1ad424cec (patch)
treeea3a939a4714e3d1a1c318a7cc17c3efc8d62003
parent414043d45fc2b51430557c4ac575651468ff9500 (diff)
downloadvte-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--ChangeLog10
-rw-r--r--src/vte.c43
2 files changed, 25 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 82f37896..a1c7afbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/src/vte.c b/src/vte.c
index 9f010f15..d17db3e9 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -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) {