Python: Why is IDLE so slow?

Posted by Adam Matan on Stack Overflow See other posts from Stack Overflow or by Adam Matan
Published on 2010-02-06T09:58:20Z Indexed on 2010/05/17 15:40 UTC
Read the original article Hit count: 423

Hi,

IDLE is my favorite Python editor. It offers very nice and intuitive Python shell which is extremely useful for unit-testing and debugging, and a neat debugger.

However, code executed under IDLE is insanely slow. By insanely I mean 3 orders of magnitude slow:

bash

time echo "for i in range(10000): print 'x'," | python

Takes 0.052s,

IDLE

import datetime
start=datetime.datetime.now()
for i in range(10000): print 'x',
end=datetime.datetime.now()
print end-start

Takes:

>>> 0:01:44.853951

Which is roughly 2,000 times slower.

Any thoughts, or ideas how to improve this? I guess it has something to do with the debugger in the background, but I'm not really sure.

Adam

© Stack Overflow or respective owner

Related posts about idle-ide

Related posts about python