
ZoneTracker: Tracking JavaScript Performance with Zone.js
Daniel James
Reading time: about 5 min
Topics:
See the Pen NEqgOr by Daniel James (@danielscottjames) on CodePen.
Analysis Drag the blocks around the screen. You will notice that different blocks stall for different amounts of time while being dragged. We log output every âminuteâ (for the purposes of this demo, I am redefining a minute to be 10 seconds) that looks like this:MINUTE_TAG: {
"blocks_0": 440,
"time_0": 5475700,
"blocks_17": 18,
"time_17": 4890800,
"blocks_50": 16,
"time_50": 4821300,
"blocks_100": 14,
"time_100": 4666900,
"blocks_250": 10,
"time_250": 3947500
}
blocks_X is the number of blocks (we group microtasks with the task theyâre attached to and call it a block) executed this minute that took X or less milliseconds. time_X is the cumulative execution time for these blocks in microseconds. There are a number of conclusions we could draw from this data, such as:
- The total amount of time we spent executing JavaScript during this 10-second window is ~5.5 seconds (time_0).
- The user spent about ~90% of this interactive time getting less than 60 FPS (time_17/time_0).
- The user experienced 10 stalls that lasted a quarter second or longer (blocks_250).
About Lucid
Lucid Software is the leader in visual collaboration and work acceleration, helping teams see and build the future by turning ideas into reality. Its products include the Lucid Visual Collaboration Suite (Lucidchart and Lucidspark) and airfocus. The Lucid Visual Collaboration Suite, combined with powerful accelerators for business agility, cloud, and process transformation, empowers organizations to streamline work, foster alignment, and drive business transformation at scale. airfocus, an AI-powered product management and roadmapping platform, extends these capabilities by helping teams prioritize work, define product strategy, and align execution with business goals. The most used work acceleration platform by the Fortune 500, Lucid's solutions are trusted by more than 100 million users across enterprises worldwide, including Google, GE, and NBC Universal. Lucid partners with leaders such as Google, Atlassian, and Microsoft, and has received numerous awards for its products, growth, and workplace culture.