• 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:

    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.

About