Key response in IPython gets very slow

This is just a copy of a recent JIRA ticket that I made
where I reported that the key response of IPython gets very slow after creating a ROOT object with PyROOT.

I would like to gather more information from a wider audience to know how to reproduce the issue. IPython version, Python version, OS, ROOT version, etc. are needed for further investigation.

Several persons in my group are suffering from the same problem, and so I would like to know what the root cause is.

Just typing the following commands make the response of the IPython session very slow.

$ ipython
In [0]: import ROOT
In [1]: g = ROOT.TGraph()

Once it is triggered, the terminal is not updated when typing keys many times quickly.

You can see what I mean from the screen capture movie.

The left terminal (Python PID = 446399) calls the TGraph constructor, and the response gets very slow at around 00:45, where “1111…111” is not shown in the terminal while the 1 key is kept pressed.

At around 00:56, I repeated typing the 1 and enter keys, but the output behaviors are very different between the left and right windows.

I confirmed that this unexpected behavior also happens on an almost clean virtual machine 10.15.5, on which only Python 3, IPython, and CMake via Homebrew are explicitly installed.

1 Like

just an idea, but it would be interesting to see what perf, vtune or other more Mac-specific profiling tools have to say about where ipython spends time.


Thank you, Enrico. I attached a profiling result in the issue thread according to your advise.

1 Like

A workaround is to add the following two lines in ~/.ipython/profile_default/startup/

import appnope

Found the same topic in 2017.

I don’t know why it is still happening in 2020.

Wow that’s where I remembered it from then! :smiley: I thought it was some blog post I had read somewhere, nice find.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.