// React Profiler looks fast. Why is the page still slow? // Teaching excerpts; see the explanation and boundaries on the episode page. // Measure the React subtree. const report = (id, phase, ms) => console.log(id, phase, ms); // Mark the handler separately. performance.mark("calc:start"); calculate(); performance.mark("calc:end"); performance.measure("calc", "calc:start", "calc:end" );