Skip to content

feat: frontend perf monitoring, gas optimization, WebSocket pooling, modular contract compilation - #824

Merged
Ebuka321 merged 1 commit into
Smartdevs17:mainfrom
ochemegina-ai:feat/perf-monitoring-gas-websocket-compilation
Jul 27, 2026
Merged

feat: frontend perf monitoring, gas optimization, WebSocket pooling, modular contract compilation#824
Ebuka321 merged 1 commit into
Smartdevs17:mainfrom
ochemegina-ai:feat/perf-monitoring-gas-websocket-compilation

Conversation

@ochemegina-ai

Copy link
Copy Markdown
Contributor

Core Web Vitals tracking (LCP, FID, CLS) with budget enforcement and regression alerts. Performance budgets validated in CI via performance-ci.yml workflow. Real user monitoring (RUM) session snapshots with 30s periodic flush to configurable endpoint. Performance regression alerts forwarded to Sentry breadcrumbs in production. Route transition tracking wired into NavigationContainer.onStateChange. Bundle size impact analysis via trackBundleSize() in performanceMonitor. Render/interaction/memory/route/bundle metrics with p95 aggregation and summary. PerformanceDashboardScreen redesigned with Core Web Vitals panel, regression alerts, and route transitions. usePerformanceProfiler extended with LCP option and new useFIDTracker hook. performance-budget.json extended with routeTransitionMs, lcpMs, fidMs, clsFrameDrops, bundleSizeBytes. check-performance-budget.js updated to validate all new budget fields. Gas benchmark tests added in contracts/subscription/src/gas_benchmarks.rs. gas-benchmark.sh updated to target new benchmark test functions. GAS_OPTIMIZATION.md documents storage slot packing, lazy init, and before/after comparison. contracts:gas-benchmark and contracts:gas-benchmark:baseline npm scripts added. WebSocket connection pooling via socketPool map (shared socket per URL, ref-counted). Message batching with configurable flush interval and head-drop backpressure. Heartbeat ping/pong health monitoring with auto-reconnect on pong timeout. Exponential backoff with jitter (capped at 30s) for reconnection. Per-client send queue on server with slow-consumer overflow protection. Per-user connection limit (default 5) for graceful degradation. WebSocketMetrics: throughputEps, eventsDelivered/Dropped, batchesFlushed, evictedClients. websocketStore.ts Zustand store exposes state, metrics, connect, disconnect, subscribe. docs/websocket-optimization.md documents all features and transport integration. Modular contract compilation: all 13 crates now use workspace soroban-sdk dependency. Feature flags per crate: testutils, oracle, extended, metering, audit-log, credit, fraud, full. contracts/.cargo/config.toml sets wasm32-unknown-unknown as default build target. contracts/Makefile with build-core, build-full, build-minimal, size-report, bench-compile targets. build-contracts action rewritten with per-crate targeting and binary size step summary. contract-build.yml CI: feature matrix (8-way parallel), binary size monitoring on PRs, compile benchmark.

Closes #767
Closes #761
Closes #760
Closes #766

…modular contract compilation

Core Web Vitals tracking (LCP, FID, CLS) with budget enforcement and regression alerts.
Performance budgets validated in CI via performance-ci.yml workflow.
Real user monitoring (RUM) session snapshots with 30s periodic flush to configurable endpoint.
Performance regression alerts forwarded to Sentry breadcrumbs in production.
Route transition tracking wired into NavigationContainer.onStateChange.
Bundle size impact analysis via trackBundleSize() in performanceMonitor.
Render/interaction/memory/route/bundle metrics with p95 aggregation and summary.
PerformanceDashboardScreen redesigned with Core Web Vitals panel, regression alerts, and route transitions.
usePerformanceProfiler extended with LCP option and new useFIDTracker hook.
performance-budget.json extended with routeTransitionMs, lcpMs, fidMs, clsFrameDrops, bundleSizeBytes.
check-performance-budget.js updated to validate all new budget fields.
Gas benchmark tests added in contracts/subscription/src/gas_benchmarks.rs.
gas-benchmark.sh updated to target new benchmark test functions.
GAS_OPTIMIZATION.md documents storage slot packing, lazy init, and before/after comparison.
contracts:gas-benchmark and contracts:gas-benchmark:baseline npm scripts added.
WebSocket connection pooling via socketPool map (shared socket per URL, ref-counted).
Message batching with configurable flush interval and head-drop backpressure.
Heartbeat ping/pong health monitoring with auto-reconnect on pong timeout.
Exponential backoff with jitter (capped at 30s) for reconnection.
Per-client send queue on server with slow-consumer overflow protection.
Per-user connection limit (default 5) for graceful degradation.
WebSocketMetrics: throughputEps, eventsDelivered/Dropped, batchesFlushed, evictedClients.
websocketStore.ts Zustand store exposes state, metrics, connect, disconnect, subscribe.
docs/websocket-optimization.md documents all features and transport integration.
Modular contract compilation: all 13 crates now use workspace soroban-sdk dependency.
Feature flags per crate: testutils, oracle, extended, metering, audit-log, credit, fraud, full.
contracts/.cargo/config.toml sets wasm32-unknown-unknown as default build target.
contracts/Makefile with build-core, build-full, build-minimal, size-report, bench-compile targets.
build-contracts action rewritten with per-crate targeting and binary size step summary.
contract-build.yml CI: feature matrix (8-way parallel), binary size monitoring on PRs, compile benchmark.

Closes Smartdevs17#767
Closes Smartdevs17#761
Closes Smartdevs17#760
Closes Smartdevs17#766
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@ochemegina-ai Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Ebuka321
Ebuka321 merged commit f1a4b49 into Smartdevs17:main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants