open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

Long code execution due to console updating

Open gagebt opened this issue 2 years ago • 1 comments

Describe the bug

On Windows and possibly others: A code with lots of operations executes much slower than in normal Python(/node/...) because the console is updated many times per second to highlight the currently executed code line. Apparently this causes Python to wait until the console finishes updating, so compute-intensive code such as long loops may execute prohibitively slowly.

Reproduce

"loop 1 milllon times"

Expected behavior

Without the bug, it should complete in much less than a second. Instead, it appears frozen with the "pass" line being executed.

Screenshots

image

Open Interpreter version

0.1.15

Python version

3.11.6

Operating System name and version

windows 11

Additional context

No response

gagebt avatar Dec 19 '23 18:12 gagebt

Possible fix: only update the console each 0.2 sec

gagebt avatar Dec 19 '23 19:12 gagebt

Closing this stale issue. If this is still a problem with the latest version of Open Interpreter, please alert me to re-open the issue. Thanks!

MikeBirdTech avatar Mar 19 '24 18:03 MikeBirdTech