Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Optimization: Add NO_MODULE_POWER_MANAGER to remove all traces of the power manager #248

Merged
merged 1 commit into from Dec 31, 2017

Conversation

@kainhofer
Copy link
Contributor

commented Dec 30, 2017

Currently, each Child and the NodeManager itself hold a pointer to the power manager, even if no power manager is ever needed or desired. This patch adds a NO_MODULE_POWER_MANAGER flag, which will not compile the power manager and also remove all code and variables related to the power manager. This saves at lease one pointer per child plus one pointer in the NodeManager. So with 10 sensors, at least 22 bytes of SRAM and some flash are saved.

Memory Optimization: Add NO_MODULE_POWER_MANAGER to remove all traces…
… of the power manager

Currently, each Child and the NodeManager itself hold a pointer to the power manager, even if no power manager is ever needed or desired. This patch adds a NO_MODULE_POWER_MANAGER flag, which will not compile the power manager and also remove all code and variables related to the power manager. This saves at lease one pointer per child plus one pointer in the NodeManager. So with 10 sensors, at least 22 bytes of SRAM and some flash are saved.
@user2684

This comment has been minimized.

Copy link
Contributor

commented Dec 31, 2017

Merging it but I will probably create a different PR for changing NO_MODULE_POWER_MANAGER into something like DISABLE_POWER_MANAGER to avoid confusion between modules (associated to sensors)
and features. I probably also want to get rid of "MODULE" entirely in my new PR, probably something like "USE_DHT" would sound easier to understand for a newbie and since so many things are changing in this version, it could be the right time to do so. Thanks!

@user2684 user2684 merged commit ffdb5f1 into mysensors:development Dec 31, 2017

@kainhofer kainhofer deleted the kainhofer:Optimize-PowerManager branch Jan 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.