Frontory

Open code, practice, and notes →

Download source with English comments · for reading

SVG · 23 Large Datasets and Update Cost

Series contents · Technology map

Stage: Export and Large-Scale Comparisons · Editable example · Storage ID: svg-step-23

Goals and learning outcomes

Prerequisites

Prerequisite concepts: Serialization, Standalone resources. Prepare the result files and observation records from Unit 22.

Key concepts and explanations

DOM size

Each SVG node is subject to style, event, and layout work. Include labels and filters in comparison conditions as well as point count.

Measurement interval

A synchronous interval measured with performance.now alone cannot tell you when the display is complete. Also inspect style and rendering work in the profile.

Practice setup

First check the execution scope guidance on the example screen. The following describes preparation for extending the assignment in a separate project. Implement this yourself in an HTML and ES module project on a separate local HTTP development server. Record the browser version, viewport, and DPR.

The linked example is a starting point. It does not implement every task below. Complete work beyond its supported scope in a separate project.

Practice tasks

  1. Prepare day-23.js and index.html in an external practice project. Generate 100,1000,5000 points with a fixed seed.
  2. Record generation and attribute update times separately from the next frame interval, and keep filters disabled.
  3. Save the output under the input condition 100, then run again with 5000. Compare the hypothesis, "DOM creation and style update workloads may increase," against the display and logs, and record the actual result and the causes of any differences in day-23-notes.md.

Variables to observe

VariableBaselineChangeExpected change / hypothesis
Point count1005000DOM creation and style update workloads may increase

Predictions in this table are not measured results. Change one condition at a time and record why the actual result differs.

Completion criteria

Self-check

  1. Which cost changes when you reduce event listener count?
  2. Why should data generation time be excluded?

Official references

Linked example and execution scope

Example source · Runtime environments and limits

An editable browser experiment. Measurements vary with the current device and browser.

Source code and records are not overwritten automatically. Resetting an existing example also preserves your notes.

Next learning

Previous: Exporting SVG Files · Next: Visible Regions and Level of Detail

Open code, practice, and notes →