From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ista Zahn 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 20:27:15 -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: multipart/alternative; boundary=001a1137954cc75a26051c20e171 X-Trace: ger.gmane.org 1438304305 26830 80.91.229.3 (31 Jul 2015 00:58:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2015 00:58:25 +0000 (UTC) Cc: 21077@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 31 02:58:15 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 1ZKyeM-0006xd-0u for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Jul 2015 02:58:14 +0200 Original-Received: from localhost ([::1]:42694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKyeL-0000Gw-9f for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jul 2015 20:58:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKyeH-0000GV-E0 for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2015 20:58:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKyeD-00036I-MC for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2015 20:58:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKyB8-0003IU-KY for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2015 20:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZKyB8-0007d8-8L for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2015 20:28:02 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 21077-submit@debbugs.gnu.org id=B21077.143830243929282 (code B ref 21077); Fri, 31 Jul 2015 00:28:02 +0000 Original-Received: (at 21077) by debbugs.gnu.org; 31 Jul 2015 00:27:19 +0000 Original-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 Original-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 Original-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== X-Received: by 10.140.217.70 with SMTP id n67mr8492qhb.95.1438302436021; Thu, 30 Jul 2015 17:27:16 -0700 (PDT) Original-Received: by 10.96.83.6 with HTTP; Thu, 30 Jul 2015 17:27:15 -0700 (PDT) Original-Received: by 10.96.83.6 with HTTP; Thu, 30 Jul 2015 17:27:15 -0700 (PDT) In-Reply-To: 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:105234 Archived-At: --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--