-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I have been thinking about ways to help reduce memory usage with this library that might be useful to other folks. In my current use case, I only want to use uClock for the internal / external clock sync, and use setOnOutputPPQN to drive all of my app's logic. I experimented by commenting out all of the onSyncXXCallback and all associated counters, as well as the shuffle code that I don't need for my app. This freed up 1830 bytes of program memory and 130 of dynamic memory. For smaller microcontrollers like the Arduino Nano, this is a huge savings and frees me up to keep adding more features.
Can we make a low memory mode feature like this available to users? Is this an idea you would be interested in pursuing? Could we possibly wrap some of these allocation and implementation blocks in a flag like #ifndef UCLOCK_NANO to allow us to use the library in a very simple, low memory mode? Do you have any other ideas that would help us reduce memory allocation of features our firmware doesn't use?