how would I be able to avoid a global redraw = call to the main view function while changing the view of a submodule like in the main Module view method:
m("body", [
m("#head", {...}),
Menu.show(this),
Footer.show(this)
])
where the static show method looks like :
function show(app)
{
if (inst == null)
inst = new Footer(app);
return inst.view(app);
}
Now it should increase the already nice performance if there is a way to run the view method of a sub view without running the main view method in case the changes in the sub view have only local effects. Does this make sense?
Axel
You can't prevent a global redraw, but you can selectively make some parts of the view not redraw by using subtree directives
Be aware however that this is a performance optimization that disables redrawing for the affected subtree, and as such, you won't be able to update its view unless you replace the directive with a subtree again.