Calling this.layout.update(); every minute might be expensive?
You could try removing lazy rendering, and do something like this:
if (changed.d) { // check days first: may need to update layout
this.layout.update(); // dayStr could be a different size now
this.layout.render(this.layout.date);
this.layout.render(this.layout.dayStr);
}
if (changed.h) this.layout.render(this.layout.hour);
if (changed.m) {
this.layout.render(this.layout.minutes);
this.layout.render(this.layout.steps);
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Calling
this.layout.update();
every minute might be expensive?You could try removing lazy rendering, and do something like this: