Measurable quality limits
Performance budgets
Keep map layers and application code from becoming slower unnoticed with versioned asset and browser checks.
Run the complete check
pnpm test:performance
The canonical limits live in performance-budgets.json and run automatically in GitHub Actions.
Browser scenarios
India map36 state/UT features · 2,500 ms desktop · 4,000 ms mobile.
Largest state layerUttar Pradesh with 75 districts · 3,500 ms desktop · 5,500 ms mobile.
Gallery filteringSearch-category update and visible-card synchronization · 250 ms.
Mobile viewport390 by 844 pixels with touch behavior enabled.
Timings include navigation, SVG fetching, parsing, feature discovery, and first visible geometry from a local HTTP server. They are regression limits rather than guarantees for every device or network.
Copyable map measurement
const startedAt = performance.now();
map.on("mapload", event => {
const duration = Math.round(performance.now() - startedAt);
console.log(`${event.detail.featureCount} features ready in ${duration} ms`);
}, { once: true });
map.load();
Static asset limits
Raw-file checks cover core CSS and JavaScript, the location index, the national layer, every public state layer, and all example scripts. Uttar Pradesh is currently the largest public state SVG at approximately 1.25 MB; all 36 public state layers total approximately 16.2 MB.
When a budget fails
- Confirm that the change intentionally added data or behavior.
- Prefer simpler SVG paths, on-demand data, or split page code before raising a limit.
- Repeat the suite on the same machine to rule out an isolated slow run.
- If the larger budget is justified, update the JSON budget with an explanation in the same pull request.