Skip to content

Printing many lines of output is ~50x slower in ipython v9.1.0 and above compared to v9.0.2 and below #14937

@jasper-tms

Description

@jasper-tms

I noticed this because when I ran history -g to print my full ipython history from the beginning of time, it completed in about half a second when I was in ipython version 9.0.2 or below. Starting with v9.1.0 and above, history -g takes an astronomical 30 seconds to go through the process of printing these many thousands of line to the terminal.

The problem isn't specific to the history command, because just printing a ton of numbers to the terminal shows the same pattern – For me, the following takes about 1 second on ipython v9.0.2 but over a minute on ipython v9.1.0:

for i in range(1_000_000):
    print(i)

I'm on an M1 Macbook, and have gotten this same behavior in both python 3.11 and 3.12. (For lower versions of python, there doesn't seem to be a wheel available to install ipython version 9.x.x, so those versions of python stay with ipython version 8.x.x)

Can anyone else reproduce this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions