3

I just wrote a simple python command to check on a big list from a csv file. The csv has 2 columns with 10K lines. when I input the 2nd row into a list and later print the list, it takes the IDLE quite some time to show it where the terminal (under mac) shows it promptly. *BTW, I checked it on 2 different machines - same result.

Obviously, no one will print 10k items on a console but the idea that one is significantly faster than the other makes me wonder: why IDLE which supposed to be python's best friend is so slow?

adhg
  • 10,437
  • 12
  • 58
  • 94
  • 2
    Many people don't like IDLE, but if it's useful, then use it. If you don't like it, use alternatives, such as an editor of your choosing and perhaps, the command line. – Arafangion Oct 12 '12 at 02:21
  • 2
    IDLE is a *developers* tool, not an environment to run production code. – madth3 Oct 12 '12 at 02:27
  • Note that console printing in general is pretty slow. I've often found that programs with really verbose logging to console run *significantly* faster when you redirect their output to a file instead (even for the same amount of output!). It's just not supposed to be fast; if you print truly vast amounts of output to the console, nobody will read it anyway, so there's not much point in IDLE developers (or anyone else) making console output super-quick. – Ben Oct 12 '12 at 06:57
  • It's not meant to be lightningly fast, but it seems that IDLE is much, much slower on OS X. Having just switched my python work from an older model PC to a brand-new Mac, I did not expect such a drop in interactive performance! – alexis Oct 08 '13 at 19:30

1 Answers1

6

The bulk of the problem is in how IDLE handles printing of text to the output window; try commenting out the print statement and see if the performance gap remains. See this closely related thread: Python: Why is IDLE so slow?

Community
  • 1
  • 1
abought
  • 2,652
  • 1
  • 18
  • 13