Slow with large output

Bug #1253907 reported by Andreas Roehler on 2013-11-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Medium
Andreas Roehler

Bug Description

http://stackoverflow.com/questions/20128425/can-i-stop-the-repl-locking-up-when-using-emacs-and-python

If I'm using a python interpreter under EMACS, then I've got various ways of evaluating code, for instance just typing it in at the REPL (Inferior Python) If that code produces too much output, then EMACS freezes solid and has to be killed.

This will do it, for instance.

[[[False] * 200 for i in range(3)] for j in range(200)]

There's no problem at all if python's running in a terminal. It just prints out False 120000 times and gives me the prompt back.

Is there any way to either limit the amount of output the inferior python process produces, or to get EMACS not to explode when faced with large outputs?

In clojure, for example, I can use *print-length* and *print-level* to solve this exact same problem.

Andreas Roehler (a-roehler) wrote :

May confirm this for Python shell.

However, with M-x IPython RET, it doesn't occur, runs nearly as fast as in console.

Changed in python-mode:
importance: Undecided → Medium
status: New → Confirmed
Changed in python-mode:
milestone: none → 6.1.4
assignee: nobody → Andreas Roehler (a-roehler)
status: Confirmed → In Progress
Andreas Roehler (a-roehler) wrote :

With recent changes doesn't freeze anymore. However still slow. Will change the title accordingly.

summary: - Large output makes Emacs freeze
+ Slow with large output
Changed in python-mode:
status: In Progress → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers