add port_yield from #10795 only on zephyr to fix #10822#10824
add port_yield from #10795 only on zephyr to fix #10822#10824dhalbert merged 2 commits intoadafruit:10.1.xfrom
Conversation
FoamyGuy
left a comment
There was a problem hiding this comment.
Looks good to me. restricts change to zephyr build only.
|
@tannewt if you have a more in-depth fix that is fine. I was just trying to reverse the effects on the change on the non-zephyr builds. The original |
tannewt
left a comment
There was a problem hiding this comment.
Sorry about this! We should definitely try FreeRTOS portYield. IIRC I added the time in order to get the idle task to run and reset its timer. There's gotta be another way to fix it though. We can do that in a follow up though.
|
Thanks guys! Is there any way to run an automated performance regression test in an emulator as part of the build process? E.g. running a wide range of operations and checking vs. a known duration timestamp for a board? I saw that there were changes to the garbage collector as well. These changes might be difficult to to test and maybe a "peformance guard" could help in some way? |
|
Automated performance regression tests would be great. But I am not so sure about the emulator part. Even if there were an emulator, it would not detect problems triggered by USB or the network stack. Running tests on dedicated hardware is possible with Github actions, see e.g. https://github.com/ChandimaJayaneththi/ESP32-GitHub-Actions-CI The CircuitPython sources do contain a number of performance tests, see directory |
|
I don't think an emulator would work because I don't know of one that is rigorous enough to get timing right. For performance testing, I think we'd want to do it on actual devices. |
|
Consistent emulator runs in the same environment would be the key. At least one emulator for one port needs to produce reasonably consistent timestamps for a performance test run, in the same CI environment on the same hardware. No need to match the exact timestamp for a run on real device. Then it could say "Loop test is up by 10%", "BLE serial slowed down by 20%", "Overall improvement by 15%". |
-- Fixes #10822
Disables calls added to #10795 to
port_yield(), except on zephyr port.Thank you @daniel-alsen.
Tested on Metro ESP32-S3 to confirm it restores proper performance.