Skip to content

perf: optimize app-wide startup and route loading [6/6] - #194

Draft
Anthony Cintron (prbatero) wants to merge 4 commits into
prbatero/feat/perf-ui-route-loadingfrom
prbatero/feat/perf-app-wide-loading
Draft

perf: optimize app-wide startup and route loading [6/6]#194
Anthony Cintron (prbatero) wants to merge 4 commits into
prbatero/feat/perf-ui-route-loadingfrom
prbatero/feat/perf-app-wide-loading

Conversation

@prbatero

Copy link
Copy Markdown
Contributor

Summary

Extend the project layer-loading stack with app-wide startup, publishing, map, and route optimizations. Stable authenticated startup now avoids management-plane reconciliation and ACL writes, while route-specific work overlaps wherever dependencies allow.

Changes

  • Add a read-only session bootstrap with object-ID-first ACL matching and principal/ACL role intersection.
  • Harden legacy user reads and updates with active-caller, self-or-admin, and strong identity checks.
  • Add a bounded five-second single-flight Published Datasets cache with ETags, conditional responses, and mutation invalidation.
  • Deduplicate visible-tab polling and clear stale requests and errors safely.
  • Overlap route imports, Azure Maps assets, dashboard/catalog data, validation data, layer-form data, and Interactive Labeler metadata/artifacts.
  • Defer Maps on Create/Edit Image Layer until the catalog drawer opens.
  • Add retryable loading failures, required artifact cancellation, route-owned map readiness markers, and lazy Help media.
  • Add fail-closed desktop/mobile cold/warm direct/in-app performance matrices with sanitized output.

Testing

  • Core library: 601 passed.
  • HTTP API: 72 passed.
  • Queue Functions: 6 passed.
  • UI: 148 passed.
  • Black, isort, and Flake8 passed for feature-owned Python files.
  • ESLint passed for all 38 changed UI files; the production Vite build transformed 2,419 modules in 431 ms.
  • Both benchmark scripts passed Node syntax checks.
  • git diff --check, VS Code diagnostics, Markdown links/tables, and feature-only detect-secrets passed.
  • Repository-wide UI lint still reports pre-existing errors in untouched components.

Stack

Open Gates

  • Do not deploy this session-bootstrap path while the Function endpoint accepts public traffic and trusts x-ms-client-principal. Restrict ingress to trusted SWA/APIM traffic or validate a signed identity first.
  • The authenticated Dev1 route matrix has not run because external Playwright auth state and representative fixture IDs were not supplied.
  • The one-to-three-second route target is therefore not yet claimed as achieved.
  • ADR-0005 remains proposed and the rollout stays blocked until these gates close.

Document the startup, publishing, map-loading, and route performance contract. Keep deployment gated on trusted Function ingress and authenticated Dev1 measurements.
Replace stable startup reconciliation with a read-only ACL bootstrap, enforce strong principal binding, and restrict legacy user reads. Add bounded single-flight Published Datasets caching with ETags and mutation invalidation.
Bootstrap sessions in one request, overlap independent route data and Azure Maps assets, and add retryable loading states. Deduplicate Published Datasets polling and cancel sibling artifact transfers on failure.
Measure cold and warm direct and in-app navigation across desktop and mobile profiles. Fail on readiness, browser, API, or p95 budget violations while keeping auth state and fixture details out of results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant