unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: 16875@debbugs.gnu.org
Subject: bug#16875: python, comint-mode: Large output makes Emacs freeze
Date: Wed, 25 Jun 2014 10:26:30 -0400	[thread overview]
Message-ID: <jwvlhslt6op.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <53AA5DA5.8060700@easy-emacs.de>

>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13675
> To a certain extend.
> There some more operations done by comint, which aren't needed when
> executing Python code from source but may slow down it.

I expect the main slowdown comes from font-lock.  But indeed, it''d be
good to try and profile it to see where the time is spent.

Last time I tried to speed up M-x grep, I changed compile.el so that it
only processes (font-lock and friends) the output up to the last \n.
This way, when a very long line is received in 100 chunks, it doesn't
get re-processed 100 times.

Maybe comint.el could do the same (especially since it already assumes
that "text between the last \n and EOB is a prompt").

> Thus solution in python-mode.el is to surpass comint-mode completely and use
> "start-process" and "process-send-string"

If the problem is really in "unneeded comint functionality" (or call it
"bloat"), that's an option, but of course if we don't know where the
performance problem comes, we may end up with the same problem anyway.

> Indeed, "pprint" should solve it already. Maybe make that the default?
> IMO looks better anyway.

[ I don't use Python, so I don't have an opinion on that, but if it
  works, fine by me.  ]

Maybe comint.el could also be changed so that it "wraps" lines if they
get past some arbitrary maximum length (like 10K chars, for example).
It wouldn't be a great solution, but if the performance sucks really bad
past 10K chars, wrapping the line might be a lesser evil.


        Stefan





  reply	other threads:[~2014-06-25 14:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  9:21 bug#16875: python, comint-mode: Large output makes Emacs freeze Andreas Röhler
2014-06-25  1:19 ` Fabián Ezequiel Gallina
2014-06-25  5:27   ` Andreas Röhler
2014-06-25 14:26     ` Stefan Monnier [this message]
2014-06-25 15:28       ` Andreas Röhler
2014-07-20 22:27       ` Fabián Ezequiel Gallina
2014-07-23  6:20         ` Andreas Röhler
2014-07-27  2:22 ` Fabián Ezequiel Gallina
2014-07-27  4:03   ` Eli Zaretskii
2014-07-28 21:35     ` Fabián Ezequiel Gallina
2014-07-29  7:32       ` Eli Zaretskii
2014-07-27 10:20   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvlhslt6op.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=16875@debbugs.gnu.org \
    --cc=andreas.roehler@easy-emacs.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).