From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 02 13:46:33 2013 Received: (at submit) by debbugs.gnu.org; 2 Jan 2013 18:46:33 +0000 Received: from localhost ([127.0.0.1]:40366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TqTKh-0002XM-FN for submit@debbugs.gnu.org; Wed, 02 Jan 2013 13:46:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48887) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TqP8G-0004MS-66 for submit@debbugs.gnu.org; Wed, 02 Jan 2013 09:17:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqP6q-0006rK-Rp for submit@debbugs.gnu.org; Wed, 02 Jan 2013 09:16:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_FRT_PROFILE1,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqP6q-0006qI-Ns for submit@debbugs.gnu.org; Wed, 02 Jan 2013 09:15:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqP1S-0000Gz-3p for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 09:10:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqP1L-0005J0-Fr for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 09:10:22 -0500 Received: from mail-out2.uio.no ([129.240.10.58]:51281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqP1L-0005Fn-0G for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 09:10:15 -0500 Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1TqP1G-0003ZJ-Mn for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 15:10:10 +0100 Received: from 1x-193-157-195-233.uio.no ([193.157.195.233] helo=rednorrock.local) by mail-mx2.uio.no with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) user oyvinst (Exim 4.80) (envelope-from ) id 1TqP1F-0002cZ-VF for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 15:10:10 +0100 From: =?utf-8?Q?=C3=98yvind?= Stegard To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Slow display in term mode (M-x term) Date: Wed, 02 Jan 2013 15:10:09 +0100 Message-ID: <87623fptfi.fsf.rednorrock@ifi.uio.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-UiO-SPF-Received: X-UiO-Ratelimit-Test: rcpts/h 1 msgs/h 1 sum rcpts/h 1 sum msgs/h 1 total rcpts 8 max rcpts/h 2 ratelimit 0 X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, T_FRT_PROFILE1=0.01, T_RP_MATCHES_RCVD=-0.01, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: DDF4E8785E4F29E72A7EFD2900EE7C1B581498B1 X-UiO-SPAM-Test: remote_host: 193.157.195.233 spam_score: -49 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 1 max/h 1 blacklist 0 greylist 0 ratelimit 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 02 Jan 2013 13:46:29 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hello bug list, Display for term emulation mode is very slow in recent emacs snapshot version. Reproduce: 0. $ emacs -Q -nw 1. M-x term (use default /bin/bash shell) 2. Run a `find /' in terminal. (Or anything really. Even typing feels sluggish.) Emacs then uses 90=E2=80=93100% CPU and output from running command is proc= essed slowly. The issue is likely not related to X, since it is reproducable also when running Emacs in gnome-terminal with `emacs -Q -nw'. Display seems to speed up significantly when selecting another window instead (for instance, switch from term window to minibuffer with C-c M-x ... while `find /' is running to observe difference). The *Messages* buffer is flooded with the following when term window is selected (har cursor) and at the same time output is produced: Invalid face attribute :foreground nil Invalid face attribute :background nil Invalid face attribute :foreground nil Invalid face attribute :background nil Invalid face attribute :foreground nil Invalid face attribute :background nil Here is some CPU profiling output while find command is running and term window is selected, obtained with M-x profiler-start before running find command in term, then M-x profiler-report after a little while. (I don't know how useful this is, but adding it to bug report regardless.) - term-emulate-terminal 24556 92% - # 12929 48% - jit-lock-function 152 0% - jit-lock-fontify-now 148 0% - byte-code 92 0% - run-hook-with-args 84 0% - font-lock-fontify-region 84 0% - font-lock-default-fontify-region 76 0% - font-lock-unfontify-region 28 0% - font-lock-default-unfontify-re 8 0% append 4 0% - font-lock-fontify-keywords-regio 24 0% make-marker 4 0% - font-lock-extend-region-multilin 8 0% get-text-property 8 0% byte-code 4 0% font-lock-set-defaults 4 0% - run-with-timer 8 0% - apply 8 0% - run-at-time 8 0% timer-set-time 4 0% - timer-activate 4 0% - timer--activate 4 0% - timer--time-less-p 4 0% time-less-p 4 0% - term-down 7384 27% - # 7072 26% - jit-lock-function 151 0% - jit-lock-fontify-now 147 0% - byte-code 111 0% - run-hook-with-args 95 0% - font-lock-fontify-region 95 0% - font-lock-default-fontify-region 87 0% + font-lock-unfontify-region 20 0% + font-lock-fontify-keywords-reg 12 0% + font-lock-extend-region-wholel 11 0% font-lock-extend-region-multil 4 0% buffer-modified-p 4 0% font-lock-set-defaults 4 0% set-match-data 12 0% - run-with-timer 12 0% - apply 12 0% - run-at-time 12 0% - timer-activate 12 0% - timer--activate 12 0% - timer--time-less-p 12 0% time-less-p 8 0% text-property-any 4 0% put-text-property 4 0% - term-insert-char 271 1% - insert-char 186 0% - jit-lock-after-change 103 0% - run-hook-with-args 56 0% + font-lock-extend-jit-lock-region-aft 56 0% put-text-property 16 0% byte-code 8 0% buffer-modified-p 4 0% + put-text-property 85 0% + term-move-columns 16 0% term-adjust-current-row-cache 8 0% - redisplay 1682 6% - redisplay_internal (C function) 1674 6% - file-remote-p 4 0% find-file-name-handler 4 0% - timer-event-handler 4 0% - byte-code 4 0% + apply 4 0% + term-handle-deferred-scroll 1162 4% + pos-visible-in-window-p 868 3% decode-coding-string 131 0% + put-text-property 76 0% + jit-lock-after-change 60 0% string-match 45 0% + term-move-columns 12 0% + term-handle-ansi-terminal-messages 7 0% recenter 4 0% + term-horizontal-column 4 0% selected-window 4 0% + call-interactively 1712 6% Automatic GC 416 1% + list 4 0% Usual bug report info follows: In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.0) of 2013-01-01 on louvi, modified by Debian (emacs-snapshot package, version 2:20121231-1~ppa1~quantal1) System Description: Ubuntu 12.10 Configured using: `configure --build x86_64-linux-gnu --host x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var --infodir=3D/usr/share/info --mandir=3D/usr/share/m= an --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs-snapshot:/etc/emacs:/usr/local/share/e= macs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24= .3.50/site-lisp:/usr/share/emacs/site-lisp --without-compress-info --with-crt-dir=3D/usr/lib/x86_64-linux-gnu/ --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-imagemagick=3Dyes' Important settings: value of $LANG: nb_NO.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Term Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ESC [ > 1 ; 3 4 0 0 ; 0 c ESC x t e r m RET RET C-c=20 ESC x p r f o DEL DEL o f i l e r - s t a r t RET RET=20 f i n d RET C-c ESC x p r o f i l e r - r e TAB p TAB=20 RET C-x o C-c C-c C-x o C-c o C-n C-p RET C-n C-n C-p=20 RET C-n C-n RET C-n C-n C-n C-n C-n RET C-n C-n RET=20 C-n C-n RET C-n C-n C-n C-n C-n C-n C-n C-n C-n C-a=20 RET C-n C-n C-p RET C-n RET C-n RET C-n RET C-p C-p=20 C-p C-p RET C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-p C-p RET C-n RET C-n RET C-n C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-n C-p RET C-n RET=20 C-n RET C-p C-p C-p C-p RET C-n RET C-p C-p C-p C-p=20 C-p C-p C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-x h ESC=20 w C-x 0 ESC x C-c ESC x t e r p ESC DEL r e p o r t=20 - e TAB RET Recent messages: Invalid face attribute :foreground nil Invalid face attribute :background nil Invalid face attribute :foreground nil Invalid face attribute :background nil Invalid face attribute :foreground nil Invalid face attribute :background nil [3 times] Invalid face attribute :foreground nil Invalid face attribute :background nil [2 times] Invalid face attribute :foreground nil Invalid face attribute :background nil Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode profiler cl-lib term disp-table easymenu ehelp electric ring time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Please CC me if more info is required as I am not subscribed. Thanks, =C3=98yvind S. --=20 < =C3=98yvind Stegard < http://stegard.net/ From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 03 01:39:19 2013 Received: (at 13337) by debbugs.gnu.org; 3 Jan 2013 06:39:19 +0000 Received: from localhost ([127.0.0.1]:40918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TqeSU-0005zo-8N for submit@debbugs.gnu.org; Thu, 03 Jan 2013 01:39:18 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:40798) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TqeSQ-0005zd-Hi for 13337@debbugs.gnu.org; Thu, 03 Jan 2013 01:39:15 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TqeSO-00045v-Oi; Thu, 03 Jan 2013 01:39:12 -0500 From: Glenn Morris To: =?utf-8?Q?=C3=98yvind?= Stegard Subject: Re: bug#13337: 24.3.50; Slow display in term mode (M-x term) References: <87623fptfi.fsf.rednorrock@ifi.uio.no> X-Spook: Ansar al-Islam Echelon Capricorn Clinton NASA BATF X-Ran: +Uq=fj[v(`du$#Ot+C'BK{N{H(g6Rr[[3a_(23x6kN<@{p{>LI%8UuXoJx$VMWsXtLR/.X X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 03 Jan 2013 01:39:12 -0500 In-Reply-To: <87623fptfi.fsf.rednorrock@ifi.uio.no> (=?utf-8?Q?=22=C3=98yv?= =?utf-8?Q?ind?= Stegard"'s message of "Wed, 02 Jan 2013 15:10:09 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13337 Cc: 13337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 03 05:09:40 2013 Received: (at 13337) by debbugs.gnu.org; 3 Jan 2013 10:09:41 +0000 Received: from localhost ([127.0.0.1]:41072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tqhk4-0003h3-03 for submit@debbugs.gnu.org; Thu, 03 Jan 2013 05:09:40 -0500 Received: from mail-out2.uio.no ([129.240.10.58]:39882) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tqhk1-0003gv-Ir for 13337@debbugs.gnu.org; Thu, 03 Jan 2013 05:09:39 -0500 Received: from mail-mx1.uio.no ([129.240.10.29]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1Tqhk0-0007G4-4U; Thu, 03 Jan 2013 11:09:36 +0100 Received: from 1x-193-157-195-233.uio.no ([193.157.195.233] helo=rednorrock.local) by mail-mx1.uio.no with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) user oyvinst (Exim 4.80) (envelope-from ) id 1Tqhjz-0001UJ-OP; Thu, 03 Jan 2013 11:09:36 +0100 From: =?utf-8?Q?=C3=98yvind?= Stegard To: Glenn Morris Subject: Re: bug#13337: 24.3.50; Slow display in term mode (M-x term) References: <87623fptfi.fsf.rednorrock@ifi.uio.no> Date: Thu, 03 Jan 2013 11:09:33 +0100 In-Reply-To: (Glenn Morris's message of "Thu, 03 Jan 2013 01:39:12 -0500") Message-ID: <87txqylgrm.fsf.rednorrock@ifi.uio.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-UiO-SPF-Received: X-UiO-Ratelimit-Test: rcpts/h 2 msgs/h 1 sum rcpts/h 2 sum msgs/h 1 total rcpts 10 max rcpts/h 2 ratelimit 0 X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, T_RP_MATCHES_RCVD=-0.01, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: 3981F8530495EDDD16FFB7F0C7739D39BA8FEE4A X-UiO-SPAM-Test: remote_host: 193.157.195.233 spam_score: -49 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 2 max/h 1 blacklist 0 greylist 0 ratelimit 0 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13337 Cc: 13337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Glenn Morris writes: > Does this patch help with performance? It should at least make the > "Invalid face attribute" messages go away. Yes, the patch helps. Face attribute error messages are gone and rendering speed is improved. Thanks, --=20 < =C3=98yvind Stegard < http://stegard.net/ From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 03 13:32:39 2013 Received: (at 13337-done) by debbugs.gnu.org; 3 Jan 2013 18:32:39 +0000 Received: from localhost ([127.0.0.1]:41886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tqpap-0002Po-5I for submit@debbugs.gnu.org; Thu, 03 Jan 2013 13:32:39 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:55088) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tqpam-0002Pf-CG for 13337-done@debbugs.gnu.org; Thu, 03 Jan 2013 13:32:37 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Tqpaj-0005xC-5H; Thu, 03 Jan 2013 13:32:33 -0500 From: Glenn Morris To: 13337-done@debbugs.gnu.org Subject: Re: bug#13337: 24.3.50; Slow display in term mode (M-x term) References: <87623fptfi.fsf.rednorrock@ifi.uio.no> <87txqylgrm.fsf.rednorrock@ifi.uio.no> X-Spook: Indigo USCOI Israel domestic disruption Gazprom United X-Ran: AI%S\J$MRs(gun]l~4N$xcJcOT+;3KRnNWj()`{P{%A(JEkO87`g+=mTqqwgN@AUt\,@m> X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 03 Jan 2013 13:32:33 -0500 In-Reply-To: <87txqylgrm.fsf.rednorrock@ifi.uio.no> (=?utf-8?Q?=22=C3=98yv?= =?utf-8?Q?ind?= Stegard"'s message of "Thu, 03 Jan 2013 11:09:33 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13337-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) Version: 24.2.92 Thanks for checking. Applied to emacs-24 branch, should show up in trunk in ~ 1 week or less. From unknown Thu Jun 19 16:23:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 01 Feb 2013 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator