Closed johan-ohrn closed 4 years ago
Yes, you are right about the perf cost, and indeed I think we can simply replace that code by:
if (!viewToRemove._elCnt && prevNode) {
prevNode.parentNode.removeChild(prevNode); // ...
nextNode.parentNode.removeChild(nextNode);
}
This has been fixed in new release v1.0.7
(I found this issue in the WIP cache version of jquery.views.js but I'm pretty sure it's in the current version as well)
at line 2920 in jquery.views.js:
Executing this code with one of my templates take ~140ms
Executing this code with the same templates take ~40ms
prevNode and? nextNode is undefined at times.