From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=98yvind?= Stegard Newsgroups: gmane.emacs.bugs Subject: bug#13337: 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1357152354 8381 80.91.229.3 (2 Jan 2013 18:45:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Jan 2013 18:45:54 +0000 (UTC) To: 13337@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 02 19:46:10 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TqTKH-0006Z3-Nk for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Jan 2013 19:46:06 +0100 Original-Received: from localhost ([::1]:43541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqTK2-0001xQ-Mv for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Jan 2013 13:45:50 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqTJv-0001vt-M1 for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 13:45:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqTJs-0003RE-2W for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 13:45:43 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqTJr-0003RA-VB for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 13:45:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TqTLB-0002YJ-Vd for bug-gnu-emacs@gnu.org; Wed, 02 Jan 2013 13:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=98yvind?= Stegard Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Jan 2013 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13337 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13571523939763 (code B ref -1); Wed, 02 Jan 2013 18:47:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Jan 2013 18:46:33 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69300 Archived-At: 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/