Read the statement by Michael Teeuw here.
odd module load behaviour after upgrading to 2.28
-
Hello,
I upgraded to the latest 2.28 a couple days ago. I’m running my magicmirror on a raspberry pi 4. I noticed that the cpu was running higher than it was in the previous version so after a quick investigation here is what I found:
I have multiple instances of mmm-touchbutton, I noticed that in the console.log message I have in the start function showed up a bunch of times I found that the number of messages is N^2 so if there are 2 instances of the module there are 4 messages generated from the start function if there are 3 instances there are 9 messages and so on.
I added logging to some other modules and found the same issue so this is not a module specific issue.
Any ideas?
-
This fix is now part of next release
-
tested this with the content of the
config.js.sample
, there are 2 weather instances in the config and I see 2 messages in the dev console -
@david6461
Hi,I am running version 2.28 of MagicMirror with multiple instances of MMM-TouchButtons and multiple instances of a couple of other of my modules.
I can’t confirm the problem.
No double messages and no increased CPU usage.
Are you sure you did not start a second instance of MagicMirror? -
-
@wishmaster270 lets try this fix
in the MM/js folder do
curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror/fixloading/js/app.js >app.js
then stop and restart mm.
this adds a hash to see if we are already loading or loaded the node_helper for this module
-
This fix is now part of next release
-