Skip to content

perf: analyze and document frontend bundle size (embedded circuit artifacts) #27

Description

@tech-adrian

Area
frontend/src/circuits/, frontend/public/circuits/

Problem
The frontend embeds compiled circuit artifacts (frontend/src/circuits/*.json / frontend/public/circuits/*.json) for client-side proving. These are typically large, and there's no documented bundle-size analysis or lazy-loading strategy — a large initial payload directly hurts "Consumer-Grade UX" on slower connections.

Proposed change
Run @next/bundle-analyzer (or similar) against a production build, document current sizes, and lazy-load circuit artifacts per-page (deposit only needs shielded_pool.json, compliance only needs compliance.json/disclosure.json) instead of bundling all of them globally if that isn't already the case.

Acceptance Criteria

  • Bundle analysis report generated and committed/linked in the PR
  • Circuit artifacts confirmed (or made) to load per-page rather than globally on first load
  • Relevant tests (just test, pnpm test, cargo test, or nargo test as applicable) pass locally and in CI
  • A screenshot or short screen recording is attached to the PR showing the change working (the bundle analyzer report before/after) — required before this can be merged.

Open your PR against the dev branch, not main. All active development merges into dev.

Discuss this issue / coordinate work: join the DShield contributor Telegram group: https://t.me/+SiGHH24No9U2MDJk

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions