Bug Description
Arising from support ticket https://support.microbit.org/helpdesk/tickets/99552 (private)
Running the simulator with a tight loop using print() consumes all RAM in less than a minute, and the page becomes unresponsive after another minute or two.
The support ticket owner reports using Linux with Firefox, and printing compass.heading()
from microbit import *
while True:
print(compass.heading())
When I test in Windows Chrome, printing a fixed string has the same effect.
from microbit import *
while True:
print("0"))
I don't see any RAM increase with a sleep in the loop, unless it's sleep(0).
from microbit import *
while True:
print("0")
sleep(1)
How To Reproduce
Steps to reproduce the behavior:
- Go to https://python.microbit.org/
- Use the code above
- Monitor memory consumption
- See error
Expected behavior
The page does not become unresponsive.
Screenshots
Environment
Desktop (please complete the following information):
- OS: [e.g. iOS] Windows 11
- Browser [e.g. chrome, safari] Chrome
- Version [e.g. 22] 148
Bug Description
Arising from support ticket https://support.microbit.org/helpdesk/tickets/99552 (private)
Running the simulator with a tight loop using print() consumes all RAM in less than a minute, and the page becomes unresponsive after another minute or two.
The support ticket owner reports using Linux with Firefox, and printing compass.heading()
When I test in Windows Chrome, printing a fixed string has the same effect.
I don't see any RAM increase with a sleep in the loop, unless it's sleep(0).
How To Reproduce
Steps to reproduce the behavior:
Expected behavior
The page does not become unresponsive.
Screenshots
Environment
Desktop (please complete the following information):