Update: This does not hold for R's inferior ESS process on Mac, but of course I'm here interested in Python.
More updates: It just seems the buffer is slow for evaluating newlines.
Whenever I evaluate (send text) to the inferior buffer, it is extremely slow to send and render the text in the inferior buffer. You can literally see it write the ...
for each single line. So imagine having a 100 line function, that would take a while (note: the actual execution of the function is no problem, just the writing lines to the buffer is).
What would be the variable to change for this?
Try:
def uselessfunction():
a = 1
a = 1
a = 1
a = 1
a = 1
a = 1
a = 1
In the output buffer it then prints:
>>> >>> >>> ... ... ... ... ... ... ... ... >>>
which appears really slowly.
Another example, using:
(process-send-string PROCESS "\n\n\n\n")
is also slow, as well as (comint-send-input)
after some lines are written in the inferior python shell.
It seems mostly enters are slowing this down.
Note that all of this is not the case in Ubuntu.
In the end, I'm now avoiding the problem by using IPython instead of Python 2.7. It has the %paste
magic command that helps me solve the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With