You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, when running e2e tests with micropython instead of python3, I got:
Traceback (most recent call last):
File "python/e2e-tests/out/python-consumer.py", line 1, in <module>
File "/home/piotr/repos/priv/kotlin-python/python/e2e-tests/out/compiled.py", line 12986, in <module>
MemoryError: memory allocation failed, allocating 26032 bytes
Looking at box tests report, >1000 tests fail with this reason. The good thing is that it's fairly reproducible: for a given box test, it always fails with such MemoryError.
My suspicion is that too much code is fed to micropython. Kotlin/Python doesn't do any Dead Code Elimination for now (to be done in #102), and the compiler output weights ~420 KiB.
The text was updated successfully, but these errors were encountered:
krzema12
changed the title
Understand and solve MemoryErrors when using MicroPython
Understand (and solve if trivial) MemoryErrors when using MicroPython
Nov 30, 2021
Just thought about this: the issue might be about the implications of instantiating a NotImplementedError. Maybe it's worth trying to raise a custom thing/error/exception to see what causes this?
Isn't that related to the cost of building the stacktrace? I don't know how that works in Python, but I wouldn't be surprised to learn that it works differently in MicroPython, or that it's just not supported.
For example, when running e2e tests with
micropython
instead ofpython3
, I got:Looking at box tests report, >1000 tests fail with this reason. The good thing is that it's fairly reproducible: for a given box test, it always fails with such
MemoryError
.My suspicion is that too much code is fed to
micropython
. Kotlin/Python doesn't do any Dead Code Elimination for now (to be done in #102), and the compiler output weights ~420 KiB.The text was updated successfully, but these errors were encountered: