lydell
July 25, 2023, 10:59am
8
What rupert said. I’ve also done it by adding console.time('render')
and console.timeEnd('render')
at carefully chosen spots in the compiled JS… For example around this block:
var nextNode = view(model);
var patches = __VirtualDom_diff(currNode, nextNode);
domNode = __VirtualDom_applyPatches(domNode, currNode, patches, sendToApp);
currNode = nextNode;
Or this block:
__VirtualDom_divertHrefToApp = divertHrefToApp;
var doc = view(model);
var nextNode = __VirtualDom_node('body')(__List_Nil)(doc.__$body);
var patches = __VirtualDom_diff(currNode, nextNode);
bodyNode = __VirtualDom_applyPatches(bodyNode, currNode, patches, sendToApp);
currNode = nextNode;
__VirtualDom_divertHrefToApp = 0;
(title !== doc.__$title) && (__VirtualDom_doc.title = title = doc.__$title);
2 Likes