-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Both Neopixel and Dotstar take a lot of cycles to update pixels. There's two different things going on that slow down both. The first is that converting from Int or RGB[W] to the bytearray is complex code that makes updating pixels slow. The penalty for more pixels is O(N) (as one would expect).
The second issue is that when brightness<1, extra work is done during .show() - the bytearray is copied and every pixel value recomputed. This probably also causes unnecessary garbage collection, and has helped me run out of memory later on in runtime through apparent fragmentation.
This technically isn't a core CircuitPython issue, but because it requires a C helper to address, some work is likely needed in CircuitPython to add helpers to speed up these tasks.