Since there appears to be some interest in lazy rendering, I've created pull request implementing it in the Layout library.
Just pass the third argument {lazy: true} to the layout constructor, and updates are as easy as:
{lazy: true}
layout.time.label = require("locale").time(d,1); layout.update(); // Only needed if there's a chance that something moved layout.render();
Demo here: https://www.espruino.com/ide/?gist=cc5f26ad897ecaa531b698781d47964a#
Edit: I see my demo has the same issue as before. If it gives you any errors enable "Pretokenise code before upload" in the web ide settings.
@NebbishHacker started
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.
Since there appears to be some interest in lazy rendering, I've created pull request implementing it in the Layout library.
Just pass the third argument
{lazy: true}
to the layout constructor, and updates are as easy as:Demo here: https://www.espruino.com/ide/?gist=cc5f26ad897ecaa531b698781d47964a#
Edit: I see my demo has the same issue as before. If it gives you any errors enable "Pretokenise code before upload" in the web ide settings.