Subject: Re: bug#13337: 24.3.50; Slow display in term mode (M-x term)

From: Glenn Morris <[email-masked]>
Date: Thu, 03 Jan 2013 01:39:12 -0500

Does this patch help with performance? It should at least make the
"Invalid face attribute" messages go away.

*** lisp/term.el	2013-01-03 06:33:25 +0000
--- lisp/term.el	2013-01-03 06:37:25 +0000
***************
*** 3216,3233 ****
          (let ((color
                 (if term-ansi-current-reverse
                     (face-foreground
!                     (elt ansi-term-color-vector term-ansi-current-color))
                   (face-background
!                   (elt ansi-term-color-vector term-ansi-current-bg-color)))))
            (setq term-current-face
                  (list :background color
                        :foreground color))
            ) ;; No need to bother with anything else if it's invisible.
        (setq term-current-face
              (list :foreground
!                   (face-foreground (elt ansi-term-color-vector term-ansi-current-color))
                    :background
!                   (face-background (elt ansi-term-color-vector term-ansi-current-bg-color))
                    :inverse-video term-ansi-current-reverse))
  
        (when term-ansi-current-bold
--- 3216,3239 ----
          (let ((color
                 (if term-ansi-current-reverse
                     (face-foreground
!                     (elt ansi-term-color-vector term-ansi-current-color)
!                     nil 'default)
                   (face-background
!                   (elt ansi-term-color-vector term-ansi-current-bg-color)
!                   nil 'default))))
            (setq term-current-face
                  (list :background color
                        :foreground color))
            ) ;; No need to bother with anything else if it's invisible.
        (setq term-current-face
              (list :foreground
!                   (face-foreground
!                    (elt ansi-term-color-vector term-ansi-current-color)
!                    nil 'default)
                    :background
!                   (face-background
!                    (elt ansi-term-color-vector term-ansi-current-bg-color)
!                    nil 'default)
                    :inverse-video term-ansi-current-reverse))
  
        (when term-ansi-current-bold