Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Mutation Observer's many observe
(version: 1)
Comparing performance of:
with observe vs without observe
Created:
one year ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function makeTree(width, depth) { if (depth<=0) return; const parent = document.createElement("div"); for (int w=0; w<width; w++) { parent.appendChild(`${w}`); parent.appendChild(makeTree(depth-1)); } return parent; } var observer = new MutationObserver((records, observer) => { })
Tests:
with observe
const tree = makeTree(50, 2); observer.observe(tree); let i = 0; for (const node of tree.childNodes) { if (++i % 2) { node.remove(); } }
without observe
const tree = makeTree(50, 2); let i = 0; for (const node of tree.childNodes) { if (++i % 2) { node.remove(); } }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
with observe
without observe
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?