The LED-Stalker plugin was looping through its table of `step` values (one for each key) on every call to `update()`, and calling `compute()` on every value there, but those table entries were only updated once every 50ms (by default), resulting in a lot of repeated computation. This resulted in the mean idle cycle time increasing from 565µs to 1317µs on the Model01 with an (almost) unmodified standard sketch. This change moves the check for the timeout before the loop through the `step` values, and aborts processing there if not enough time has elapsed. The resulting mean idle cycle time becomes 577µs -- an almost negligible increase. It also reduces the PROGMEM footprint by 44 bytes. Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>pull/592/head
parent
e2423fa793
commit
ddafb73803
Loading…
Reference in new issue