Why does python idle become so slow when handling very large inputs, when the python command line does not?
For example, if I run "aman"*10000000 in python IDLE, it becomes unresponsive, but on python cmd line, it is quick.
Why does python idle become so slow when handling very large inputs, when the python command line does not?
For example, if I run "aman"*10000000 in python IDLE, it becomes unresponsive, but on python cmd line, it is quick.
I had to research a bit. When I invoked idle on my machine, I saw another python process which uses
idlelib
The last parameter (60839) made me think. So I looked around for
idlelib
and got the implementation here https://github.com/pypy/pypy/blob/master/lib-python/2.7/idlelib/run.py#L49 The comment there saysNow, things were clear to me. The IDLE sends commands to python interpreter over a TCP connection. Still, I am not convinced. Then I read the complete
Help
->About IDLE
->README
. It saysConclusion
When we have such a dependency (IDLE depending on response over a socket), the delay what you experienced is perfectly fine.