Lionel Fourquaux offers this very simple patch to speed up SFTP,
[sgt/putty] / terminal.c
index d23f054..806d650 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * Terminal emulator.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -4093,7 +4097,7 @@ static void term_out(Terminal *term)
                break;
              case SEEN_OSC_P:
                {
-                   int max = (term->osc_strlen == 0 ? 21 : 16);
+                   int max = (term->osc_strlen == 0 ? 21 : 15);
                    int val;
                    if ((int)c >= '0' && (int)c <= '9')
                        val = c - '0';
@@ -4822,10 +4826,12 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
                != newline[j].attr) {
                int k;
 
-               for (k = laststart; k < j; k++)
-                   term->disptext[i]->chars[k].attr |= ATTR_INVALID;
+               if (!dirtyrect) {
+                   for (k = laststart; k < j; k++)
+                       term->disptext[i]->chars[k].attr |= ATTR_INVALID;
 
-               dirtyrect = TRUE;
+                   dirtyrect = TRUE;
+               }
            }
 
            if (dirtyrect)