You're right. I verified that too. Thank you.pythoncoder wrote: ↑Thu Mar 10, 2022 11:28 amSee my comment to the second issue: the code runs OK and it seems to be an IDE problem.
Search found 10 matches
- Thu Mar 10, 2022 1:12 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: Pico freezes very regularly
- Replies: 6
- Views: 5743
Re: Pico freezes very regularly
- Wed Mar 09, 2022 3:16 am
- Forum: Raspberry Pi microcontroller boards
- Topic: Pico freezes very regularly
- Replies: 6
- Views: 5743
Re: Pico freezes very regularly
I am having frequent hang as well. Cannot connect to REPL and cannot break out from a loop with CTRL-C. Since then I - Do not run main loop in main.py. Expose run() function to manually start from REPL. - Use SWD to upload frozen code. - Connect reset switch to rp2. Related issues: https://github.co...
- Sat Feb 26, 2022 2:57 pm
- Forum: General Discussion and Questions
- Topic: Slow returning scalar types in async function
- Replies: 7
- Views: 3792
Re: Slow returning scalar types in async function
The code ret(v) is running a generator function, instantiating a generator, and then discarding the generator. This is an unusual thing to do in a loop. While your observation is very odd, I'm not sure whether the performance of a generator function (rather than a generator) would be seen as a crit...
- Fri Feb 25, 2022 6:34 pm
- Forum: General Discussion and Questions
- Topic: Slow returning scalar types in async function
- Replies: 7
- Views: 3792
Re: Slow returning scalar types in async function
import time def ret(arg): yield None def test3(klass=int, count=10000): for n in range(count): v = klass() ret(v) def test4(v=0, count=10000): for n in range(count): ret(v) t = time.ticks_ms() test3(dict) print('dict(): ' + str(time.ticks_diff(time.ticks_ms(), t))) t = time.ticks_ms() test3(int) pr...
- Fri Feb 25, 2022 3:12 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: [Fixed] 1.18.155 update breaks builds
- Replies: 5
- Views: 3384
Re: 1.18.155 update breaks builds
Similar problem is on github issue now.
https://github.com/micropython/micropython/issues/8356
https://github.com/micropython/micropython/issues/8356
- Fri Feb 25, 2022 8:57 am
- Forum: General Discussion and Questions
- Topic: Slow returning scalar types in async function
- Replies: 7
- Views: 3792
Re: Slow returning scalar types in async function
Similar result with yield: import time def ret(arg): yield arg def test3(count=10000, d=False): for n in range(count): if d: v = dict(a=0) # list() object() else: v = int() # 0 r = next(ret(v)) t = time.ticks_ms() test3(d=True) print('dict(): ' + str(time.ticks_diff(time.ticks_ms(), t))) t = time.ti...
- Fri Feb 25, 2022 2:59 am
- Forum: General Discussion and Questions
- Topic: Slow returning scalar types in async function
- Replies: 7
- Views: 3792
Slow returning scalar types in async function
I found a weird performance issue. In async functions, it is a lot slower when returning scalar types than object types. import time import uasyncio as asyncio async def ret(arg): return arg async def test3(count=10000, d=False): for n in range(count): if d: v = dict() # list() or object() else: v =...
- Wed Feb 09, 2022 12:25 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: [SOLVED] Building RP2 firmware with frozen modules.
- Replies: 3
- Views: 2875
Re: Has anyone built RP2 firmware with frozen modules?
rp2 port is missing FROZEN_MANIFEST option. Just made PR request https://github.com/micropython/micropython/pull/8280 for this. For the moment, this is part of my build script: ... # modify rp2 manifest file # https://docs.micropython.org/en/latest/reference/manifest.html?highlight=manifest MANIFEST...
- Thu Jan 06, 2022 9:34 am
- Forum: General Discussion and Questions
- Topic: unix port does not support PYTHONPATH?
- Replies: 2
- Views: 4907
- Thu Jan 06, 2022 5:39 am
- Forum: General Discussion and Questions
- Topic: unix port does not support PYTHONPATH?
- Replies: 2
- Views: 4907
unix port does not support PYTHONPATH?
It seems PYTHONPATH is not recognized by unix port of micropython. How do you set import path for unix micropython, without modifying source code? And if I have to modify sys.path for unix micropython, where is good place put the code? Is there a bootstrap script for unix port? I want to use unix mi...