Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 596225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:08:56+00:00 2026-05-13T16:08:56+00:00

IDLE is my favorite Python editor. It offers very nice and intuitive Python shell

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:08:56+00:00Added an answer on May 13, 2026 at 4:08 pm

    The problem is the text output not the debugger.

    I just tried it on my Q6600 (3GHz overclocked) System and my numbers are even worse.
    But its easy to see that they are going down the more output text is added.

    I tried to run it with

    1000 iterations => 7,8 sec
    2000 iterations => 28,5 sec
    3000 iterations => 70 sec

    I did some low level TK stuff in the past and i know that the TkText Widget is keeping the text in a BTree structure. Appending text a character a time is one of the worst ways to do but this seems to be what IDLE is doing. The normal way is to catch more data and append a larger chunk of text.

    Amazingly if you write print ‘x\n’ the output is much faster. 3000 iterations in 7 seconds and your 10000 in 19 sec.

    So the problem is definitely with appending single chars to existing lines. The IDLE programmer didn’t know how TkText works.

    So the advise is to add more newlines into your text or output larger chunks and not only a single ‘x’ character.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you don't want to use a tee, before you… May 16, 2026 at 4:46 pm
  • Editorial Team
    Editorial Team added an answer If notes should always be related to units, your best… May 16, 2026 at 4:46 pm
  • Editorial Team
    Editorial Team added an answer This is quite easy. Here is the solution. You have… May 16, 2026 at 4:46 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called
IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall
Idle pondering from a Scala learner perhaps, but ... in my tinkerings I've written
An idle question on language design, see Does C# have a right hand if
Does windows closes idle sockets? I mean if I'm a client connecting to a
Why does IDLE handle one symbol correctly but not another? >>> e = '€'
I messed up my IDLE shortcut. What is the way to start IDLE from
This happens in IDLE and Windows 7 RC1 (if that helps). Here is the
I'm currently using IDLE, its decent, but I'd like to know if there're better
{x for x in range(10)} works perfectly on IDLE, but when I try this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.