From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Ista Zahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jul 2015 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21077@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14370663053071 (code B ref -1); Thu, 16 Jul 2015 17:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jul 2015 17:05:05 +0000 Received: from localhost ([127.0.0.1]:51350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFmal-0000nH-PC for submit@debbugs.gnu.org; Thu, 16 Jul 2015 13:05:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58133) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFmFe-0000FQ-La for submit@debbugs.gnu.org; Thu, 16 Jul 2015 12:43:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFmFY-0000Rr-C1 for submit@debbugs.gnu.org; Thu, 16 Jul 2015 12:43:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFmFY-0000Rn-8c for submit@debbugs.gnu.org; Thu, 16 Jul 2015 12:43:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFmFX-00018w-8C for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 12:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFmFR-0000Qg-DJ for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 12:43:07 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:35199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFmFR-0000QW-8r for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 12:43:01 -0400 Received: by qkbp125 with SMTP id p125so53880598qkb.2 for ; Thu, 16 Jul 2015 09:42:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=zO9FSEHi8waIGS+w8nsy/u6LfUdMgOYlqINHKSJ5WDM=; b=ntBKEEzUxqjia3mBX1tAHerYPpxAkCdaC95SuvzfuU8NdNpk7r7Q+/BIAOaCExhpEi X3FZwsJx02mflCrEeWw/tp/AmZwDbrY3zxMzOxoubo2WmOMMyo2CkjXcXBtY6Au4N7aa bO7Ia7WVGoabrPey5FvTC3WoJEuQt4cLvPeLbeDxXDAsa/pXtW0YRQEtjizBaW1sfob7 fXBikJtm2Xft9UYlJ4WbAUfxqjX4UnMghzR1wbC1UfaA2cHbDywe6yKQ7QxzEd91EMMG q4eXVuyE5joQwZVibUTQGwcYHo4T8iLIzXjsReNM+tnqEFi/ftBF7WDPfrVAk219dwAt JMHA== X-Received: by 10.140.106.101 with SMTP id d92mr18454999qgf.70.1437064979699; Thu, 16 Jul 2015 09:42:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.110.6 with HTTP; Thu, 16 Jul 2015 09:42:39 -0700 (PDT) From: Ista Zahn Date: Thu, 16 Jul 2015 12:42:39 -0400 Message-ID: Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Thu, 16 Jul 2015 13:05:02 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) From: Ista Zahn To: bug-gnu-emacs@gnu.org Subject: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock --text follows this line-- 1. Start emacs with 'emacs -Q' 2. Start inferior python process with 'M-x run-python' 3. Run 'print(list(range(9999)))' in the *Python* buffer Result: emacs grinds to a halt and has to be killed. Setting '(setq python-shell-enable-font-lock nil)' after step 1 fixes the problem. In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2) of 2015-04-20 on bitzer.hoetzel.info Windowing system distributor `The X.Org Foundation', version 11.0.11702000 Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Inferior Python Minor modes in effect: compilation-shell-minor-mode: t tooltip-mode: t electric-indent-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 blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Making python-shell-interpreter local to *Python* while let-bound! Making python-shell-interpreter-args local to *Python* while let-bound! Sent python-shell-completion-setup-code Sent python-ffap-setup-code Sent python-eldoc-setup-code Making completion list... Quit Type "q" in help window to restore its previous buffer. You can run the command `describe-function' with C-h f Type "q" in help window to restore its previous buffer. command-execute: Command attempted to use minibuffer while in minibuffer 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-fns help-mode compile cl-extra python easymenu json comint ring cl-loaddefs cl-lib ansi-color time-date tooltip electric uniquify 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 prog-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 nadvice 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 gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 85167 7385) (symbols 48 19060 0) (miscs 40 66 149) (strings 32 12981 4007) (string-bytes 1 392970) (vectors 16 10694) (vector-slots 8 403996 7441) (floats 8 69 390) (intervals 56 271 19) (buffers 960 14) (heap 1024 41397 1140)) From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jul 2015 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ista Zahn Cc: 21077@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143707171012259 (code B ref 21077); Thu, 16 Jul 2015 18:36:02 +0000 Received: (at 21077) by debbugs.gnu.org; 16 Jul 2015 18:35:10 +0000 Received: from localhost ([127.0.0.1]:51405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFnzx-0003Be-CL for submit@debbugs.gnu.org; Thu, 16 Jul 2015 14:35:09 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:54476) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFnzu-0003B5-9q for 21077@debbugs.gnu.org; Thu, 16 Jul 2015 14:35:08 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NRL00000FE7TC00@mtaout28.012.net.il> for 21077@debbugs.gnu.org; Thu, 16 Jul 2015 21:34:14 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NRL00NT7FL29I30@mtaout28.012.net.il>; Thu, 16 Jul 2015 21:34:14 +0300 (IDT) Date: Thu, 16 Jul 2015 21:34:20 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83615k6jf7.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ista Zahn > Date: Thu, 16 Jul 2015 12:42:39 -0400 > > 1. Start emacs with 'emacs -Q' > 2. Start inferior python process with 'M-x run-python' > 3. Run 'print(list(range(9999)))' in the *Python* buffer > > Result: emacs grinds to a halt and has to be killed. No, it doesn't: it just becomes very slow, and you need to wait longer for it to finish. In my case, it took a whopping 14 minutes, and produced this in the *Messages* buffer: Error during redisplay: (jit-lock-function 52112) signaled (error "Stack overflow in regexp matcher") Error during redisplay: (jit-lock-function 56220) signaled (error "Stack overflow in regexp matcher") Error during redisplay: (jit-lock-function 57879) signaled (error "Stack overflow in regexp matcher") From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Ista Zahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jul 2015 19:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 21077@debbugs.gnu.org Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143707378715284 (code B ref 21077); Thu, 16 Jul 2015 19:10:02 +0000 Received: (at 21077) by debbugs.gnu.org; 16 Jul 2015 19:09:47 +0000 Received: from localhost ([127.0.0.1]:51423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFoXS-0003yS-Pq for submit@debbugs.gnu.org; Thu, 16 Jul 2015 15:09:47 -0400 Received: from mail-qk0-f170.google.com ([209.85.220.170]:35594) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFoXQ-0003yA-Ml for 21077@debbugs.gnu.org; Thu, 16 Jul 2015 15:09:45 -0400 Received: by qkbm65 with SMTP id m65so2440979qkb.2 for <21077@debbugs.gnu.org>; Thu, 16 Jul 2015 12:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=G0r/S2CRruD5Gn8X4hwJXmkIZLNxu4YlvQto8wUtSUI=; b=zgCqUE5uQ18HqbGPjwysqe1o/HjOWKBKkayZgnDienr6gBcAigMlUsAojdM9i7Dct5 47DBBG3+VzPBxRBCW+KXGW4Fv/qCbxuPWmr5pGkqHxqfjiBaN4Dij0Dnp3eZv7Hqhayr /UVVZRVMELFq5C6C8JT5jHLkUiDsjx/3RABiJiVneyZM4R42GGGBsLfFTSm+zFtHrCFB y1WXslHCFrKRLhNiz0o+ifkNdT94PwaCVV2RLcQeuBnBVqdQaczOq2c1QNqY8/JMOQmI S5lj62Hs1tHPGJuNM2mhCCcplvg8lBX0g+qhljr7kE7Nj+/auXeJ0b0wXTZcCB4p2iy6 8ylg== X-Received: by 10.140.85.85 with SMTP id m79mr20060196qgd.37.1437073779250; Thu, 16 Jul 2015 12:09:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.110.6 with HTTP; Thu, 16 Jul 2015 12:09:19 -0700 (PDT) In-Reply-To: <83615k6jf7.fsf@gnu.org> References: <83615k6jf7.fsf@gnu.org> From: Ista Zahn Date: Thu, 16 Jul 2015 15:09:19 -0400 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Thu, Jul 16, 2015 at 2:34 PM, Eli Zaretskii wrote: >> From: Ista Zahn >> Date: Thu, 16 Jul 2015 12:42:39 -0400 >> >> 1. Start emacs with 'emacs -Q' >> 2. Start inferior python process with 'M-x run-python' >> 3. Run 'print(list(range(9999)))' in the *Python* buffer >> >> Result: emacs grinds to a halt and has to be killed. > > No, it doesn't: it just becomes very slow, and you need to wait longer > for it to finish. In my case, it took a whopping 14 minutes, Either way this is not good. Clearly there is something wrong here. Nitpicking about whether it requires killing emacs or not doesn't seem helpful to me. --Ista and > produced this in the *Messages* buffer: > > Error during redisplay: (jit-lock-function 52112) signaled (error "Stack overflow in regexp matcher") > Error during redisplay: (jit-lock-function 56220) signaled (error "Stack overflow in regexp matcher") > Error during redisplay: (jit-lock-function 57879) signaled (error "Stack overflow in regexp matcher") From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jul 2015 19:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ista Zahn Cc: 21077@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143707528217663 (code B ref 21077); Thu, 16 Jul 2015 19:35:01 +0000 Received: (at 21077) by debbugs.gnu.org; 16 Jul 2015 19:34:42 +0000 Received: from localhost ([127.0.0.1]:51430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFovZ-0004an-Tk for submit@debbugs.gnu.org; Thu, 16 Jul 2015 15:34:42 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:35896) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFovV-0004aY-Bv for 21077@debbugs.gnu.org; Thu, 16 Jul 2015 15:34:38 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NRL00000HXL1O00@a-mtaout22.012.net.il> for 21077@debbugs.gnu.org; Thu, 16 Jul 2015 22:34:31 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NRL00MIKIDCYB80@a-mtaout22.012.net.il>; Thu, 16 Jul 2015 22:34:31 +0300 (IDT) Date: Thu, 16 Jul 2015 22:34:33 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <834ml37v7a.fsf@gnu.org> References: <83615k6jf7.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ista Zahn > Date: Thu, 16 Jul 2015 15:09:19 -0400 > Cc: 21077@debbugs.gnu.org > > Either way this is not good. Clearly there is something wrong here. > Nitpicking about whether it requires killing emacs or not doesn't seem > helpful to me. I thought I was doing fine by providing additional details about the problem. Now I'm beginning to think I maybe should have kept my mouth shut. From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Ista Zahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jul 2015 19:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 21077@debbugs.gnu.org Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143707623319063 (code B ref 21077); Thu, 16 Jul 2015 19:51:01 +0000 Received: (at 21077) by debbugs.gnu.org; 16 Jul 2015 19:50:33 +0000 Received: from localhost ([127.0.0.1]:51437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFpAu-0004xN-5h for submit@debbugs.gnu.org; Thu, 16 Jul 2015 15:50:32 -0400 Received: from mail-qg0-f52.google.com ([209.85.192.52]:35081) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFpAs-0004xB-Ia for 21077@debbugs.gnu.org; Thu, 16 Jul 2015 15:50:31 -0400 Received: by qgii95 with SMTP id i95so6641812qgi.2 for <21077@debbugs.gnu.org>; Thu, 16 Jul 2015 12:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=eMUYMGUxqFJB83JkhHQj8kQWlzbT74DopN0Zs7uphho=; b=CiWjSofu0IFwoQam4sVCzMVw3iVrDasbR1VyzXvlhmD2YGPQaiPGQ4VzKYUS+LLLNZ feDIyRIG9IokkqWM4pea+2s5ZNQg1Yt74HI5uymYZ08fS2TjFG1yimn2CvHCcAKKirAg RwrEEK5BAi/od5bG2FXqNclFy9FhOObdmG9wWfBpYNaB2odiZ0Ci9xKDZwNP8a+ZEO5w hr5t/656aRW6gASOKEqJDr/uejW0P9+PVDQe8YxvWymY+3bFucn3nipIiXxuBRtJBNzv ujGPRqLHAc0HsbXq0Vnu3mCtBh4TGSoUbVg4UeYKld1Wnz4WqYZR3sr+sKxl67j7cwgv cA4g== X-Received: by 10.140.23.5 with SMTP id 5mr19833393qgo.106.1437076225064; Thu, 16 Jul 2015 12:50:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.110.6 with HTTP; Thu, 16 Jul 2015 12:50:05 -0700 (PDT) In-Reply-To: <834ml37v7a.fsf@gnu.org> References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> From: Ista Zahn Date: Thu, 16 Jul 2015 15:50:05 -0400 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Thu, Jul 16, 2015 at 3:34 PM, Eli Zaretskii wrote: >> From: Ista Zahn >> Date: Thu, 16 Jul 2015 15:09:19 -0400 >> Cc: 21077@debbugs.gnu.org >> >> Either way this is not good. Clearly there is something wrong here. >> Nitpicking about whether it requires killing emacs or not doesn't seem >> helpful to me. > > I thought I was doing fine by providing additional details about the > problem. Now I'm beginning to think I maybe should have kept my mouth > shut. I'm sorry, I came of sounding nasty there. I felt you were minimizing the seriousness of the issue, which I see now may not have been your intent. And even if it was there was no reason for me to be so ill-tempered. So, my apologies. Best, Ista From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jul 2015 06:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ista Zahn Cc: 21077@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143711601220079 (code B ref 21077); Fri, 17 Jul 2015 06:54:02 +0000 Received: (at 21077) by debbugs.gnu.org; 17 Jul 2015 06:53:32 +0000 Received: from localhost ([127.0.0.1]:51599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFzWW-0005Dm-5t for submit@debbugs.gnu.org; Fri, 17 Jul 2015 02:53:32 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:46302) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFzWS-0005DX-Rs for 21077@debbugs.gnu.org; Fri, 17 Jul 2015 02:53:30 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NRM00F00DUZWJ00@mtaout26.012.net.il> for 21077@debbugs.gnu.org; Fri, 17 Jul 2015 09:56:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NRM00AK2DY5LO50@mtaout26.012.net.il>; Fri, 17 Jul 2015 09:56:29 +0300 (IDT) Date: Fri, 17 Jul 2015 09:53:32 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83380n6zrn.fsf@gnu.org> References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ista Zahn > Date: Thu, 16 Jul 2015 15:50:05 -0400 > Cc: 21077@debbugs.gnu.org > > On Thu, Jul 16, 2015 at 3:34 PM, Eli Zaretskii wrote: > >> From: Ista Zahn > >> Date: Thu, 16 Jul 2015 15:09:19 -0400 > >> Cc: 21077@debbugs.gnu.org > >> > >> Either way this is not good. Clearly there is something wrong here. > >> Nitpicking about whether it requires killing emacs or not doesn't seem > >> helpful to me. > > > > I thought I was doing fine by providing additional details about the > > problem. Now I'm beginning to think I maybe should have kept my mouth > > shut. > > I'm sorry, I came of sounding nasty there. I felt you were minimizing > the seriousness of the issue, which I see now may not have been your > intent. It wasn't. Something is clearly wrong with the regexps involved in this recipe, at least. > And even if it was there was no reason for me to be so > ill-tempered. So, my apologies. No sweat. Misunderstandings happen. From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jul 2015 08:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 21077@debbugs.gnu.org, Ista Zahn Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143712201829534 (code B ref 21077); Fri, 17 Jul 2015 08:34:02 +0000 Received: (at 21077) by debbugs.gnu.org; 17 Jul 2015 08:33:38 +0000 Received: from localhost ([127.0.0.1]:51687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZG15O-0007gH-0P for submit@debbugs.gnu.org; Fri, 17 Jul 2015 04:33:38 -0400 Received: from smtp-pri-03-1.vtxnet.net ([212.147.62.147]:34561 helo=smtp-pri-03.vtxnet.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZG15L-0007g8-Bh for 21077@debbugs.gnu.org; Fri, 17 Jul 2015 04:33:36 -0400 Received: from localhost (unknown [127.0.0.1]) by smtp-pri-03.vtxnet.net (VTX Services SA) with ESMTP id 0E1C068B8A9; Fri, 17 Jul 2015 08:33:34 +0000 (UTC) Received: from smtp-pri-03.vtxnet.net ([212.147.62.147]) by localhost (smtp-pri-03.vtxnet.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ItXDAgmXb_t2; Fri, 17 Jul 2015 10:33:29 +0200 (CEST) Received: from fmsmemgm.homelinux.net (dyn.83-228-180-068.dsl.vtx.ch [83.228.180.68]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-pri-03.vtxnet.net (VTX Services SA) with ESMTP id DB2FC68B8A8; Fri, 17 Jul 2015 10:33:29 +0200 (CEST) Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 7FFF0AE17E; Fri, 17 Jul 2015 04:33:29 -0400 (EDT) From: Stefan Monnier Message-ID: References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> Date: Fri, 17 Jul 2015 04:33:29 -0400 In-Reply-To: <83380n6zrn.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Jul 2015 09:53:32 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > It wasn't. Something is clearly wrong with the regexps involved in > this recipe, at least. The trigger is simple and a well-known problem in Emacs: the command you pass to Python outputs one very long line, and Emacs assumes at various places that lines aren't too long. One such assumption is in font-lock itself, another appears to be in one of the regexps used in the font-lock config of inferior python mode. Stefan From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock In-Reply-To: Resent-From: Rasmus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jul 2015 08:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21077@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.143712338831513 (code B ref -1); Fri, 17 Jul 2015 08:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Jul 2015 08:56:28 +0000 Received: from localhost ([127.0.0.1]:51696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZG1RT-0008CB-Jf for submit@debbugs.gnu.org; Fri, 17 Jul 2015 04:56:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34378) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZG1RR-0008Bx-TF for submit@debbugs.gnu.org; Fri, 17 Jul 2015 04:56:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZG1RL-0005Zz-KR for submit@debbugs.gnu.org; Fri, 17 Jul 2015 04:56:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG1RL-0005Zv-H7 for submit@debbugs.gnu.org; Fri, 17 Jul 2015 04:56:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG1RK-0000ns-JK for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 04:56:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZG1RF-0005YD-JD for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 04:56:18 -0400 Received: from plane.gmane.org ([80.91.229.3]:51948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG1RF-0005Y0-CO for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 04:56:13 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZG1RE-0001An-4z for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 10:56:12 +0200 Received: from ip5b4025d5.dynamic.kabel-deutschland.de ([91.64.37.213]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jul 2015 10:56:12 +0200 Received: from rasmus by ip5b4025d5.dynamic.kabel-deutschland.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jul 2015 10:56:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: Rasmus Date: Fri, 17 Jul 2015 10:56:05 +0200 Lines: 39 Message-ID: <87d1zrkvru.fsf@gmx.us> References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip5b4025d5.dynamic.kabel-deutschland.de Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUKFRJUbVlfi3YgQT2n 0Kvg/N5UophZjX8kV1c+lpjySPhsAAAACXBIWXMAAABIAAAASABGyWs+AAAB8ElEQVQ4y9VTwY7T QAydrDn02KiL6HGpirhOsJDCbQvJnV0yd5C6WfXIgWY50h5wj0ioyvwtz56kSKU/gKWm4/dsP4+d OJcsX8zcJbuuQ3N7Ac+qEELjLyQEtdt/amaVZoQGxzf4//CXgIQSU5fVoarDqWa2hMBVCDeoeeOy cDcS+bKaOvc23GXhHu7zZiSK5Urzwv2z8BGHK6QNxML06qZOUBivVFyb/4AGpkaMfRW5+d9CnYh6 JLJEvEKnn9VtVgNBmRHr9UP4pOInwuU5HpN4bNtKB1TlY0aR47ISY9z8XumApgPumNmxxAOoummq RSK8Z+eZWHrgcV1V73MbFrH35JlLLRVju26/mARAoAlHqePm2L5MG2HgxCwHI2IfN33COcUroSbv NlKwV4KoBA6il74X5gMcnyqh0Mk0ez4DQcTWEmyvP+iV/dx73MAnDWBS7nH2/FMgohpDAiuc8r1e kU38IHuSJKgPI7T2D/RDqXUjCPgEeNdGsTg/kKzDkvm2fezF69C0y0SQ80W3ffwVD1KqJKVSrBfZ da93Ty++d0+mmGbK9pLIbJdLuYW+rUGTSjsJz2WWdd1XqGMQRNiPI0+8Rwx5vXZaqbWLALg8rMZW qo2hJ6cEpdDh5RiAyfm3h1iDsnOCxsxz3P2H9gdT4qxCIzJxIQAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAxMS0wNy0yMVQxNzoyNDo1NSswMjowMFwRps8AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTEtMDct MjFUMTc6MjQ6NTUrMDI6MDAtTB5zAAAAAElFTkSuQmCC User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:imCGQqmaXf6DVdjeWH5Y+X7egks= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Stefan Monnier writes: >> It wasn't. Something is clearly wrong with the regexps involved in >> this recipe, at least. > > The trigger is simple and a well-known problem in Emacs: the command you > pass to Python outputs one very long line, and Emacs assumes at various places > that lines aren't too long. One such assumption is in font-lock itself, > another appears to be in one of the regexps used in the font-lock config > of inferior python mode. The problem is also very much present in the R interface provided by ESS. The R package data.table has a pretty good solution to long output IMO. E.g. R> data.table(x=1:1000000) x 1: 1 2: 2 3: 3 4: 4 5: 5 --- 999996: 999996 999997: 999997 999998: 999998 999999: 999999 1000000: 1000000 As I remember Python Pandas does something similar. Would it be feasible to implement a generalized version of cutting output for comint-like output if exceeding N lines? Rasmus -- Warning: Everything saved will be lost From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Ista Zahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jul 2015 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 21077@debbugs.gnu.org, Eli Zaretskii Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143820302610229 (code B ref 21077); Wed, 29 Jul 2015 20:51:02 +0000 Received: (at 21077) by debbugs.gnu.org; 29 Jul 2015 20:50:26 +0000 Received: from localhost ([127.0.0.1]:33910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKYIz-0002ev-Le for submit@debbugs.gnu.org; Wed, 29 Jul 2015 16:50:25 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:33304) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKYIx-0002em-Bj for 21077@debbugs.gnu.org; Wed, 29 Jul 2015 16:50:23 -0400 Received: by qkdg63 with SMTP id g63so11289402qkd.0 for <21077@debbugs.gnu.org>; Wed, 29 Jul 2015 13:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=7EipZWc/MwBcN0gn3CjGr3eyNA2xofg2YlsvPpRXJqI=; b=l9l3krhaSPAq95Djo2cDjfPpgwtCtNNboAiEjtToD2uPaXc7FcT0CgJDPHwMK2Vc9L sNts+vb1soaVkb42b4F+CNsj1BBwJW0sYkzlz2OkYrcCOamxXlJd47KZUx3YN35twvKJ Ir9XJlSoYbCVMhBBs+bwsaXyY7DXDtfiLh/GyI+Ol2aMjJPrWM+/ulm5Sm+oECDxfeCk HqDuLJQNcnZsyASK7LuP/UWzvzqB9rSj8Eri7WkFWxmgciZa9naiuRoYydWGd0YVOMKK 9ro0+cOb1cQe5vrtPxScB84EDyMmkZw5ssv9VcM0CACdt8PMKMBOZnaZLtoXANrHdjxF yMdg== X-Received: by 10.55.27.13 with SMTP id b13mr63873139qkb.93.1438203022849; Wed, 29 Jul 2015 13:50:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.83.6 with HTTP; Wed, 29 Jul 2015 13:50:03 -0700 (PDT) In-Reply-To: References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> From: Ista Zahn Date: Wed, 29 Jul 2015 16:50:03 -0400 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Fri, Jul 17, 2015 at 4:33 AM, Stefan Monnier wrote: >> It wasn't. Something is clearly wrong with the regexps involved in >> this recipe, at least. > > The trigger is simple and a well-known problem in Emacs: the command you > pass to Python outputs one very long line, and Emacs assumes at various places > that lines aren't too long. One such assumption is in font-lock itself, > another appears to be in one of the regexps used in the font-lock config > of inferior python mode. Sorry for the delay in responding. I think a reasonable short term measure is to set python-shell-enable-font-lock to nil by default, and perhaps add a warning to the doc string to the effect that setting it to a non-nil value can dramatically slow down printing. Best, Ista > > > Stefan From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jul 2015 23:20:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ista Zahn Cc: 21077@debbugs.gnu.org, Eli Zaretskii Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143829839923438 (code B ref 21077); Thu, 30 Jul 2015 23:20:04 +0000 Received: (at 21077) by debbugs.gnu.org; 30 Jul 2015 23:19:59 +0000 Received: from localhost ([127.0.0.1]:35265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKx7G-00065w-QK for submit@debbugs.gnu.org; Thu, 30 Jul 2015 19:19:59 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:47019) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKx7D-00065n-HU for 21077@debbugs.gnu.org; Thu, 30 Jul 2015 19:19:56 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.DIT.UMontreal.CA (8.14.1/8.14.1) with ESMTP id t6UNJvbB012777; Thu, 30 Jul 2015 19:19:58 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id F4111AE09C; Thu, 30 Jul 2015 19:19:50 -0400 (EDT) From: Stefan Monnier Message-ID: References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> Date: Thu, 30 Jul 2015 19:19:50 -0400 In-Reply-To: (Ista Zahn's message of "Wed, 29 Jul 2015 16:50:03 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5383=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5383> : inlines <3499> : streams <1480435> : uri <2000412> X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) > Sorry for the delay in responding. I think a reasonable short term > measure is to set python-shell-enable-font-lock to nil by default, and > perhaps add a warning to the doc string to the effect that setting it > to a non-nil value can dramatically slow down printing. As mentioned, font-lock is but one of the parts of Emacs that slow down as lines get longer. In the case of comint modes, rather than disable font-lock we should refrain from font-locking the text after the last \n (since that's the line that keeps getting expanded, so we end up re-font-locking it O(N) times for a line of length N, for a total amount of work of O(N^2)). IIRC I have a similar hack in grep.el or compile.el. Stefan From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Ista Zahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jul 2015 00:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 21077@debbugs.gnu.org, Eli Zaretskii Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143830243929282 (code B ref 21077); Fri, 31 Jul 2015 00:28:02 +0000 Received: (at 21077) by debbugs.gnu.org; 31 Jul 2015 00:27:19 +0000 Received: from localhost ([127.0.0.1]:35282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKyAQ-0007cD-S5 for submit@debbugs.gnu.org; Thu, 30 Jul 2015 20:27:19 -0400 Received: from mail-qg0-f43.google.com ([209.85.192.43]:35080) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKyAO-0007c3-J7 for 21077@debbugs.gnu.org; Thu, 30 Jul 2015 20:27:17 -0400 Received: by qgii95 with SMTP id i95so36070506qgi.2 for <21077@debbugs.gnu.org>; Thu, 30 Jul 2015 17:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iBqGMMcjGg6QQSRHZMAmkMf5hh60OQS7Wmm3qEDH7Co=; b=LxjaorqbpE2jFuUpAop3X3tjIFqAvxIxwuqt2qRY9Q/sI49Myv0xTnuS2NY/X36bbZ AUGn6pzmexeWISfvBU5YmZjjL6XNSEKXb4w2M8J75GU68T99W4NxUcf9SugHs7+J+3jU vCs2Y08d0JU3fuQmDu5d7ac0CEa7Ii3zAkhqQ2C1YnN4QfxF16vrqvv6hcn+wHoV0JQE tzMY2lI2W1bhr6qlF0RucJ4i0YGqfH8XZS68Ezm5JNHYbjSittaE8q5chfiKvtlL6SNy M4M1tk/1a0PSRurS5UL/iB4blg64odgtBrX8hYAZIexpnKxdQoU85zm0+yFDZltXhAUk wSwA== MIME-Version: 1.0 X-Received: by 10.140.217.70 with SMTP id n67mr8492qhb.95.1438302436021; Thu, 30 Jul 2015 17:27:16 -0700 (PDT) Received: by 10.96.83.6 with HTTP; Thu, 30 Jul 2015 17:27:15 -0700 (PDT) Received: by 10.96.83.6 with HTTP; Thu, 30 Jul 2015 17:27:15 -0700 (PDT) In-Reply-To: References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> Date: Thu, 30 Jul 2015 20:27:15 -0400 Message-ID: From: Ista Zahn Content-Type: multipart/alternative; boundary=001a1137954cc75a26051c20e171 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a1137954cc75a26051c20e171 Content-Type: text/plain; charset=UTF-8 On Jul 30, 2015 7:19 PM, "Stefan Monnier" wrote: > > > Sorry for the delay in responding. I think a reasonable short term > > measure is to set python-shell-enable-font-lock to nil by default, and > > perhaps add a warning to the doc string to the effect that setting it > > to a non-nil value can dramatically slow down printing. > > As mentioned, font-lock is but one of the parts of Emacs that slow down > as lines get longer. python-shell-enable-font-lock is the only place I've encountered were things become unusable. I'm not all that concerned with things slowing down slightly, but I do think the cases (like this one) that render emacs unusable need to be fixed or worked around. > > In the case of comint modes, rather than disable font-lock we should > refrain from font-locking the text after the last \n (since that's the > line that keeps getting expanded, so we end up re-font-locking it O(N) > times for a line of length N, for a total amount of work of O(N^2)). > IIRC I have a similar hack in grep.el or compile.el. OK, but unless there are clear plans to fix this soon the default value of python-shell-enable-font-lock should be changed to nil until such time as a fix is in place. Best, Ista > > > Stefan --001a1137954cc75a26051c20e171 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Jul 30, 2015 7:19 PM, "Stefan Monnier" <monnier@iro.umontreal.ca> wrote:
>
> > Sorry for the delay in responding. I think a reasonable short ter= m
> > measure is to set python-shell-enable-font-lock to nil by default= , and
> > perhaps add a warning to the doc string to the effect that settin= g it
> > to a non-nil value can dramatically slow down printing.
>
> As mentioned, font-lock is but one of the parts of Emacs that slow dow= n
> as lines get longer.

python-shell-enable-font-lock is the only place I've enc= ountered were things become unusable. I'm not all that concerned with t= hings slowing down slightly, but I do think the cases (like this one) that = render emacs unusable need to be fixed or worked around.
>
> In the case of comint modes, rather than disable font-lock we should > refrain from font-locking the text after the last \n (since that's= the
> line that keeps getting expanded, so we end up re-font-locking it O(N)=
> times for a line of length N, for a total amount of work of O(N^2)). > IIRC I have a similar hack in grep.el or compile.el.

OK, but unless there are clear plans to fix this soon the de= fault value of=C2=A0 python-shell-enable-font-lock should be changed to nil= until such time as a fix is in place.

Best,
Ista
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--001a1137954cc75a26051c20e171-- From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jul 2015 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ista Zahn Cc: 21077@debbugs.gnu.org, Eli Zaretskii Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143838043813115 (code B ref 21077); Fri, 31 Jul 2015 22:08:02 +0000 Received: (at 21077) by debbugs.gnu.org; 31 Jul 2015 22:07:18 +0000 Received: from localhost ([127.0.0.1]:36121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLIST-0003PS-BM for submit@debbugs.gnu.org; Fri, 31 Jul 2015 18:07:18 -0400 Received: from smtp207.alice.it ([82.57.200.103]:16944) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLISQ-0003PG-1X for 21077@debbugs.gnu.org; Fri, 31 Jul 2015 18:07:15 -0400 Received: from fmsmemgm.homelinux.net (95.224.31.198) by smtp207.alice.it (8.6.060.28) id 55BB66530022AB30; Sat, 1 Aug 2015 00:07:12 +0200 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 769B2AE091; Fri, 31 Jul 2015 18:07:09 -0400 (EDT) From: Stefan Monnier Message-ID: References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> Date: Fri, 31 Jul 2015 18:07:09 -0400 In-Reply-To: (Ista Zahn's message of "Thu, 30 Jul 2015 20:27:15 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) >> As mentioned, font-lock is but one of the parts of Emacs that slow down >> as lines get longer. > I'm not all that concerned with things slowing down slightly, Neither am I. All the others I care about also end up rendering Emacs unusable. They just show up at different times, or start biting you at different line lengths. >> In the case of comint modes, rather than disable font-lock we should >> refrain from font-locking the text after the last \n (since that's the >> line that keeps getting expanded, so we end up re-font-locking it O(N) >> times for a line of length N, for a total amount of work of O(N^2)). >> IIRC I have a similar hack in grep.el or compile.el. > OK, but unless there are clear plans to fix this soon the default value of > python-shell-enable-font-lock should be changed to nil until such time as a > fix is in place. I disagree. All comint modes suffer from this problem, AFAIK, and I don't see why Python programs would be more likely to generate long lines than programs in other languages. But yes, I'd really be happy to see some tentative patch along the lines I outlined above. Stefan From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Ista Zahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Aug 2015 01:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 21077@debbugs.gnu.org, Eli Zaretskii Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143839361132089 (code B ref 21077); Sat, 01 Aug 2015 01:47:01 +0000 Received: (at 21077) by debbugs.gnu.org; 1 Aug 2015 01:46:51 +0000 Received: from localhost ([127.0.0.1]:36187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLLsx-0008LV-5D for submit@debbugs.gnu.org; Fri, 31 Jul 2015 21:46:51 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:35562) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLLsu-0008LN-Fs for 21077@debbugs.gnu.org; Fri, 31 Jul 2015 21:46:49 -0400 Received: by qgii95 with SMTP id i95so57606982qgi.2 for <21077@debbugs.gnu.org>; Fri, 31 Jul 2015 18:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=mG5ft7I7HUslQEiG8S6RqeDMIh+Tz3aSpl9WPvy43iI=; b=eDITywRP7QwYUflS6p9c3YAqVn6E7XXsKcmf4T8pnwPPEcHM5RBJr6RSAzfLl9GLFX thhDqm4WyRCEBYjqWE03ne/Tjdm/yofSkYj0Q/Zsy+ZkdgkZOPANoveF9fN2CoPZ0mOj 6UInlyeBf4Dsqh6bOP9N/Alz55zRrvC0huBetbDsVOkDnDuFUApWh32M4oTVDBOoxzBQ lYlP42Dkp8g/6ldzXxhe/yDFG6Z3+ryetWlC1LV3dtzfJ8R4jkrBMGroWaQF1XciSd66 8cDhSKGfSl+EwbCHJxqns4zPqBwbaNMW+pJcheNL058ku2noGllAiRHdt+Bu7/n24c8G ygVQ== X-Received: by 10.140.30.33 with SMTP id c30mr9678383qgc.37.1438393607915; Fri, 31 Jul 2015 18:46:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.83.6 with HTTP; Fri, 31 Jul 2015 18:46:28 -0700 (PDT) In-Reply-To: References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> From: Ista Zahn Date: Fri, 31 Jul 2015 21:46:28 -0400 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Fri, Jul 31, 2015 at 6:07 PM, Stefan Monnier wrote: >>> As mentioned, font-lock is but one of the parts of Emacs that slow down >>> as lines get longer. >> I'm not all that concerned with things slowing down slightly, > > Neither am I. All the others I care about also end up rendering > Emacs unusable. They just show up at different times, or start biting > you at different line lengths. > >>> In the case of comint modes, rather than disable font-lock we should >>> refrain from font-locking the text after the last \n (since that's the >>> line that keeps getting expanded, so we end up re-font-locking it O(N) >>> times for a line of length N, for a total amount of work of O(N^2)). >>> IIRC I have a similar hack in grep.el or compile.el. >> OK, but unless there are clear plans to fix this soon the default value of >> python-shell-enable-font-lock should be changed to nil until such time as a >> fix is in place. > > I disagree. All comint modes suffer from this problem, AFAIK, and > I don't see why Python programs would be more likely to generate long > lines than programs in other languages. Try this with the currently released version of emacs: 1. Start emacs with 'emacs -Q' 2. Type 'M-x ielm' then '(number-sequence 1 9999)' 3. Type 'M-x eshell' then 'number-sequence 1 9999 RET' 4. Type 'M-x shell' then 'python -c "print(list(range(9999)))" RET' 5. Type 'M-x run-python' then 'print(list(range(9999))) RET' For me 1-3 print relatively quickly, 4 prints relatively slowly, and _only_ 5 is so slow that I consider it non-functional. This bug report is about issue 5 above. Of course if you have a patch to make 4 faster as well that's great. But 5 is the bug I'm reporting here, and I would really appreciate it someone would either accept my suggestion for fixing it or provide an alternative fix that does the job better. Best, Ista > > But yes, I'd really be happy to see some tentative patch along the lines > I outlined above. > > > Stefan From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock In-Reply-To: Resent-From: Wolfgang Jenkner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Aug 2015 12:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ista Zahn Cc: 21077@debbugs.gnu.org, Stefan Monnier Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.14384327181265 (code B ref 21077); Sat, 01 Aug 2015 12:39:02 +0000 Received: (at 21077) by debbugs.gnu.org; 1 Aug 2015 12:38:38 +0000 Received: from localhost ([127.0.0.1]:36340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLW3i-0000KL-4g for submit@debbugs.gnu.org; Sat, 01 Aug 2015 08:38:38 -0400 Received: from b2bfep13.mx.upcmail.net ([62.179.121.58]:34675) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLW3e-0000K7-UK for 21077@debbugs.gnu.org; Sat, 01 Aug 2015 08:38:35 -0400 Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep13.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150801123833.CZEL2939.b2bfep13-int.chello.at@edge11.upcmail.net> for <21077@debbugs.gnu.org>; Sat, 1 Aug 2015 14:38:33 +0200 Received: from iznogoud.viz ([91.119.209.86]) by edge11.upcmail.net with edge id zQeY1q00d1sPNFv0BQeY0C; Sat, 01 Aug 2015 14:38:33 +0200 X-SourceIP: 91.119.209.86 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZLW3c-0003EV-8i; Sat, 01 Aug 2015 14:38:32 +0200 From: Wolfgang Jenkner Date: Sat, 01 Aug 2015 14:36:23 +0200 References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> Message-ID: <85vbcz5gl3.fsf@iznogoud.viz> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Fri, Jul 31 2015, Ista Zahn wrote: > 1. Start emacs with 'emacs -Q' > 2. Type 'M-x ielm' then '(number-sequence 1 9999)' > 3. Type 'M-x eshell' then 'number-sequence 1 9999 RET' > 4. Type 'M-x shell' then 'python -c "print(list(range(9999)))" RET' > 5. Type 'M-x run-python' then 'print(list(range(9999))) RET' > > For me 1-3 print relatively quickly, 4 prints relatively slowly, and > _only_ 5 is so slow that I consider it non-functional. This bug report > is about issue 5 above. I tested this with the current (bdd370b) vanilla emacs -Q master and also a slightly older (78c3e14, not quite vanilla) version and I find that 5 takes about 20 seconds while 4 takes about 30 seconds to print the whole list (and the next prompt). So, the reason for the behaviour you reported (and Eli confirmed) might be elsewhere than in font-locking? I compiled emacs with ./configure --prefix=/usr/opt --with-x --with-x-toolkit=no --without-rsvg --without-cairo --without-gsettings --with-file-notification=no --without-compress-install and the beginning of the python buffer is Python 2.7.10 (default, Jul 4 2015, 12:57:42) [GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] on freebsd10 Type "help", "copyright", "credits" or "license" for more information. >>> python.el: readline is available >>> python.el: sent setup code >>> print(list(range(9999))) I've also a ~/.pythonrc.py which contains import rlcompleter, readline readline.parse_and_bind('tab: complete') From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock In-Reply-To: Resent-From: Wolfgang Jenkner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Aug 2015 12:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 21077@debbugs.gnu.org, Ista Zahn Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.14384329381621 (code B ref 21077); Sat, 01 Aug 2015 12:43:01 +0000 Received: (at 21077) by debbugs.gnu.org; 1 Aug 2015 12:42:18 +0000 Received: from localhost ([127.0.0.1]:36344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLW7F-0000Q5-Vd for submit@debbugs.gnu.org; Sat, 01 Aug 2015 08:42:18 -0400 Received: from b2bfep14.mx.upcmail.net ([62.179.121.59]:52707) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLW7E-0000Px-2H for 21077@debbugs.gnu.org; Sat, 01 Aug 2015 08:42:16 -0400 Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep14.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150801124214.KKIJ11791.b2bfep14-int.chello.at@edge12.upcmail.net> for <21077@debbugs.gnu.org>; Sat, 1 Aug 2015 14:42:14 +0200 Received: from iznogoud.viz ([91.119.209.86]) by edge12.upcmail.net with edge id zQiE1q00L1sPNFv0CQiEb0; Sat, 01 Aug 2015 14:42:14 +0200 X-SourceIP: 91.119.209.86 Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZLW7C-0003Ee-4t; Sat, 01 Aug 2015 14:42:14 +0200 From: Wolfgang Jenkner References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> Date: Sat, 01 Aug 2015 14:42:14 +0200 Message-ID: <85oair5gex.fsf@iznogoud.viz> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Thu, Jul 30 2015, Stefan Monnier wrote: > In the case of comint modes, rather than disable font-lock we should > refrain from font-locking the text after the last \n (since that's the > line that keeps getting expanded, so we end up re-font-locking it O(N) > times for a line of length N, for a total amount of work of O(N^2)). > IIRC I have a similar hack in grep.el or compile.el. But comint-output-filter does (font-lock-prepend-text-property prompt-start (point) 'font-lock-face 'comint-highlight-prompt) So keyword fontification seems to be inhibited anyway. Is this done in a particularly inefficient way? Wolfgang (who ought to go read the source) From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Ista Zahn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Aug 2015 16:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Wolfgang Jenkner Cc: 21077@debbugs.gnu.org, Stefan Monnier Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143844641123207 (code B ref 21077); Sat, 01 Aug 2015 16:27:02 +0000 Received: (at 21077) by debbugs.gnu.org; 1 Aug 2015 16:26:51 +0000 Received: from localhost ([127.0.0.1]:36761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLZcY-00062F-Rw for submit@debbugs.gnu.org; Sat, 01 Aug 2015 12:26:51 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:35100) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLZcX-000626-0m for 21077@debbugs.gnu.org; Sat, 01 Aug 2015 12:26:49 -0400 Received: by qkbm65 with SMTP id m65so38833446qkb.2 for <21077@debbugs.gnu.org>; Sat, 01 Aug 2015 09:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=KtvbXGy5LxuIAgigtH+blA7W/3BQczN1zymG98GaiRg=; b=N0o7maBZLfk0J7FRZZDWbEO9soBy9RHp2fHMadzReFj/xIknZg2quve2vdLPkCZKHW yock54QHAVmKeUik6ktJNgAqonSCfjNibjUAqH136weJOYHWAN4AJj7tSXt0NHNF4g62 bvSRYVyNAv85O61728DghOKLyXUxUWntqd1hUjJ/cSaWArtyFyoHRUjaiP6nLHtmtJOA 9XwAocrzBRFhpk3qav7+NDF8s4c286IGpEVyW763SX+aHDVqzrXTVFXgMi4snlpZWNI6 y4XDh8WQiCkcfiS8lYhggAVLyz/krQeYT8k1OuQZbynGL/1mMCsVntFN/IAsYEjgJ9t3 pWeg== X-Received: by 10.55.43.146 with SMTP id r18mr14214555qkr.27.1438446408561; Sat, 01 Aug 2015 09:26:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.83.6 with HTTP; Sat, 1 Aug 2015 09:26:28 -0700 (PDT) In-Reply-To: <85vbcz5gl3.fsf@iznogoud.viz> References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> <85vbcz5gl3.fsf@iznogoud.viz> From: Ista Zahn Date: Sat, 1 Aug 2015 12:26:28 -0400 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, Aug 1, 2015 at 8:36 AM, Wolfgang Jenkner wrote: > On Fri, Jul 31 2015, Ista Zahn wrote: > >> 1. Start emacs with 'emacs -Q' >> 2. Type 'M-x ielm' then '(number-sequence 1 9999)' >> 3. Type 'M-x eshell' then 'number-sequence 1 9999 RET' >> 4. Type 'M-x shell' then 'python -c "print(list(range(9999)))" RET' >> 5. Type 'M-x run-python' then 'print(list(range(9999))) RET' >> >> For me 1-3 print relatively quickly, 4 prints relatively slowly, and >> _only_ 5 is so slow that I consider it non-functional. This bug report >> is about issue 5 above. > > I tested this with the current (bdd370b) vanilla emacs -Q master and > also a slightly older (78c3e14, not quite vanilla) version and I find > that 5 takes about 20 seconds while 4 takes about 30 seconds to print > the whole list (and the next prompt). So, the reason for the behaviour > you reported (and Eli confirmed) might be elsewhere than in > font-locking? This bug report is against emacs 24.5; I think you'll find very different results there. Nevertheless it is good to know that things are improved in recent development versions; I have confirmed that this is true on my system as well. So at least we can look forward to this being fixed in the 25.0 release. I'm not sure when that is expected, but unless it is expected to be released soon I think it would be a good idea to backport a fix to 24.5. Best, > > I compiled emacs with > > ./configure --prefix=/usr/opt --with-x --with-x-toolkit=no --without-rsvg --without-cairo --without-gsettings --with-file-notification=no --without-compress-install > > and the beginning of the python buffer is > > Python 2.7.10 (default, Jul 4 2015, 12:57:42) > [GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] on freebsd10 > Type "help", "copyright", "credits" or "license" for more information. >>>> python.el: readline is available >>>> python.el: sent setup code >>>> print(list(range(9999))) > > I've also a ~/.pythonrc.py which contains > > import rlcompleter, readline > readline.parse_and_bind('tab: complete') From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Aug 2015 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Wolfgang Jenkner Cc: 21077@debbugs.gnu.org, Ista Zahn Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143863809024985 (code B ref 21077); Mon, 03 Aug 2015 21:42:02 +0000 Received: (at 21077) by debbugs.gnu.org; 3 Aug 2015 21:41:30 +0000 Received: from localhost ([127.0.0.1]:38685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZMNUA-0006Uv-1a for submit@debbugs.gnu.org; Mon, 03 Aug 2015 17:41:30 -0400 Received: from smtp-as-01.vtxnet.net ([194.38.175.130]:60351) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZMNU8-0006Un-Gj for 21077@debbugs.gnu.org; Mon, 03 Aug 2015 17:41:29 -0400 Received: from smtp-as-01.vtxnet.net (localhost [127.0.0.1]) by smtp-as-01.vtxnet.net (Postfix) with ESMTP id 4F43D5DFAD; Mon, 3 Aug 2015 23:41:27 +0200 (CEST) X-Spam-Flag: NO X-Spam-Score: -1.235 X-Spam-Level: X-Spam-Status: No, score=-1.235 tagged_above=-999 required=999 tests=[BAYES_00=-1.9, SPF_SOFTFAIL=0.665] autolearn=no Received: from smtp-pri-03.vtxnet.net (smtp-pri-03-1.vtxnet.net [212.147.62.147]) by smtp-as-01.vtxnet.net (Postfix) with ESMTP id 6F7295DFAC; Mon, 3 Aug 2015 23:41:25 +0200 (CEST) Received: from localhost (unknown [127.0.0.1]) by smtp-pri-03.vtxnet.net (VTX Services SA) with ESMTP id 6D00768B82C; Mon, 3 Aug 2015 21:41:25 +0000 (UTC) Received: from smtp-pri-03.vtxnet.net ([212.147.62.147]) by localhost (smtp-pri-03.vtxnet.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CPc3SXuMzJA6; Mon, 3 Aug 2015 23:41:24 +0200 (CEST) Received: from fmsmemgm.homelinux.net (dyn.83-228-180-068.dsl.vtx.ch [83.228.180.68]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-pri-03.vtxnet.net (VTX Services SA) with ESMTP id 88A9068B7E8; Mon, 3 Aug 2015 23:41:24 +0200 (CEST) Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 1FB4CAE148; Mon, 3 Aug 2015 17:41:24 -0400 (EDT) From: Stefan Monnier Message-ID: References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> <85oair5gex.fsf@iznogoud.viz> Date: Mon, 03 Aug 2015 17:41:24 -0400 In-Reply-To: <85oair5gex.fsf@iznogoud.viz> (Wolfgang Jenkner's message of "Sat, 01 Aug 2015 14:42:14 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) >> In the case of comint modes, rather than disable font-lock we should >> refrain from font-locking the text after the last \n (since that's the >> line that keeps getting expanded, so we end up re-font-locking it O(N) >> times for a line of length N, for a total amount of work of O(N^2)). >> IIRC I have a similar hack in grep.el or compile.el. > But comint-output-filter does > (font-lock-prepend-text-property prompt-start (point) > 'font-lock-face > 'comint-highlight-prompt) > So keyword fontification seems to be inhibited anyway. Is this done in > a particularly inefficient way? That doesn't inhibit keyword fontification per se. It just makes most keyword rules ineffective, but the test is done after the hard work anyway, so in a way yes, it's done in an inefficient way (tho skipping some keywords by checking font-lock-face would in general be even more inefficient). Stefan From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: Wolfgang Jenkner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Aug 2015 23:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ista Zahn Cc: 21077@debbugs.gnu.org, =?UTF-8?Q?Fabi=C3=A1n?= Ezequiel Gallina Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.14386462775459 (code B ref 21077); Mon, 03 Aug 2015 23:58:02 +0000 Received: (at 21077) by debbugs.gnu.org; 3 Aug 2015 23:57:57 +0000 Received: from localhost ([127.0.0.1]:38721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZMPcC-0001Py-Um for submit@debbugs.gnu.org; Mon, 03 Aug 2015 19:57:57 -0400 Received: from b2bfep12.mx.upcmail.net ([62.179.121.57]:36978) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZMPcA-0001Pp-Bd for 21077@debbugs.gnu.org; Mon, 03 Aug 2015 19:57:55 -0400 Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep12.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150803235752.XSSK24118.b2bfep12-int.chello.at@edge12.upcmail.net> for <21077@debbugs.gnu.org>; Tue, 4 Aug 2015 01:57:52 +0200 Received: from iznogoud.viz ([91.119.118.222]) by edge12.upcmail.net with edge id 0Pxs1r0064nzBbv0CPxsNZ; Tue, 04 Aug 2015 01:57:52 +0200 X-SourceIP: 91.119.118.222 Received: from wolfgang by iznogoud.viz with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1ZMPc7-000N0g-TW; Tue, 04 Aug 2015 01:57:51 +0200 From: Wolfgang Jenkner References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> <85vbcz5gl3.fsf@iznogoud.viz> Date: Tue, 04 Aug 2015 01:57:51 +0200 In-Reply-To: (Ista Zahn's message of "Sat, 1 Aug 2015 12:26:28 -0400") Message-ID: <85bneovsao.fsf@iznogoud.viz> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Sat, Aug 01 2015, Ista Zahn wrote: > Nevertheless it is good to know that things are improved in recent > development versions; For the record, this bug was previously discussed in bug#16875 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16875 and the author of python.el fixed it in 60cc81a Date: Sat Jul 26 20:43:51 2014 -0300 Robust shell syntax highlighting. (Bug#18084, Bug#16875) and the following commits. From unknown Sun Jun 22 00:36:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2016 01:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ista Zahn Cc: 21077@debbugs.gnu.org, Wolfgang Jenkner , Stefan Monnier Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.146845989928473 (code B ref 21077); Thu, 14 Jul 2016 01:32:02 +0000 Received: (at 21077) by debbugs.gnu.org; 14 Jul 2016 01:31:39 +0000 Received: from localhost ([127.0.0.1]:50352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNVV5-0007P6-5Q for submit@debbugs.gnu.org; Wed, 13 Jul 2016 21:31:39 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:33054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNVV2-0007Oj-Tk; Wed, 13 Jul 2016 21:31:37 -0400 Received: by mail-io0-f170.google.com with SMTP id 38so62800757iol.0; Wed, 13 Jul 2016 18:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+qcbZeRnZWPY8QSoJ4A79PfW1PB3Aj3iNdbJb2GijdE=; b=r3PqlNUnSQbyLINv8CRq1WNPiAhdvd/0Tr9qK01rUtxqNCfWLmnz8cCFp02QixsEtk tCVuFNzJ3rEaoVG3jHaXsI38HAVvi536YXaGdl2NA+IaEnmYpjruK2CsGqOe7Wien4hp gTMg7rPc+vRdL6ySOK7E0oWtPWtyD1sap4Te/qmhAhWOvItWo/g3JuTdp+aVivHYX6UI sw6sf5d+zwcT99YA3sshCAu65QeWGWuoOALNC9rYOMVkf854PcSsHLjG8AhRurwQTOvs 5ZyuwDhcPFloVkTAU8LaSnp2DrNKEefYGh4QGLw7LeT1noNubIek5mMNXgBQh2isOMIx CgUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=+qcbZeRnZWPY8QSoJ4A79PfW1PB3Aj3iNdbJb2GijdE=; b=jm4e3jgD6anc1Bi4mv7Ig5H3Yi7qIinYXzI5IIbyUGC1748/hPQYb7C9in37frlpIl Fg3TfttaEDH8GqAKkQVX36ONqJGFWsQXn2JVOLp1bM7DggNV+Grpp2secMGD1ZUG7hyn LErY07Jk6WbyatEPy68Hzv6ZGXa8X5fI2VNDL7RIB6widxaI9Y5VOffGLGwwPWZO49Y4 SIB7lbarLCMsMh0obzXVJIwMSby8KLM7KlYDlg1mGdC2N9vk7wIc5nQvMTPumhybR6tJ Vs70DpjQWj+i86Nsy5iAG0zGAZmmKp1f/EK+LT1QrQPFa4KhB0jTWQ3ilWS4QGjatoxZ KsxA== X-Gm-Message-State: ALyK8tKtaryFcdJFItpDUB1w9C1e/HFnDOgCrss3FWMM/fwBLJnawqgvUc7LLOM9jy8LDw== X-Received: by 10.107.11.74 with SMTP id v71mr13155773ioi.107.1468459891457; Wed, 13 Jul 2016 18:31:31 -0700 (PDT) Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id 80sm159878iof.18.2016.07.13.18.31.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jul 2016 18:31:31 -0700 (PDT) From: npostavs@users.sourceforge.net References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> <85vbcz5gl3.fsf@iznogoud.viz> Date: Wed, 13 Jul 2016 21:31:29 -0400 In-Reply-To: (Ista Zahn's message of "Sat, 1 Aug 2015 12:26:28 -0400") Message-ID: <874m7tf1ji.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 21077 fixed close 21077 25.1 quit Ista Zahn writes: > > This bug report is against emacs 24.5; I think you'll find very > different results there. > > Nevertheless it is good to know that things are improved in recent > development versions; I have confirmed that this is true on my system > as well. So at least we can look forward to this being fixed in the > 25.0 release. I'm not sure when that is expected, but unless it is > expected to be released soon I think it would be a good idea to > backport a fix to 24.5. Emacs 24.5 is not being maintained (i.e., there will be no 24.6), so I'm closing this bug report.