From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock Date: Thu, 30 Jul 2015 19:19:50 -0400 Message-ID: References: <83615k6jf7.fsf@gnu.org> <834ml37v7a.fsf@gnu.org> <83380n6zrn.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438298429 7826 80.91.229.3 (30 Jul 2015 23:20:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2015 23:20:29 +0000 (UTC) Cc: 21077@debbugs.gnu.org To: Ista Zahn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 31 01:20:16 2015 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 1ZKx7X-0001Na-Sq for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Jul 2015 01:20:16 +0200 Original-Received: from localhost ([::1]:42464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKx7X-0001tU-46 for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jul 2015 19:20:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKx7R-0001tG-0S for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2015 19:20:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKx7P-0003C0-5g for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2015 19:20:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKx7O-0003Au-Pg for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2015 19:20:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZKx7N-00066L-F6 for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2015 19:20:05 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143829839923438 (code B ref 21077); Thu, 30 Jul 2015 23:20:04 +0000 Original-Received: (at 21077) by debbugs.gnu.org; 30 Jul 2015 23:19:59 +0000 Original-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 Original-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 Original-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 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id F4111AE09C; Thu, 30 Jul 2015 19:19:50 -0400 (EDT) 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) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:105233 Archived-At: > 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