Skip to content

Dev#35

Merged
ttbombadil merged 11 commits intomainfrom
dev
Mar 2, 2026
Merged

Dev#35
ttbombadil merged 11 commits intomainfrom
dev

Conversation

@ttbombadil
Copy link
Collaborator

No description provided.

ttbombadil and others added 11 commits March 2, 2026 11:44
- Add CompilationWorkerPool with configurable worker count (~50% of CPUs)
- Add Worker thread implementation for async compilation
- Wrap in PooledCompiler adapter for drop-in compatibility
- Integrate into compiler.routes.ts with no breaking changes
- All 882 tests pass (0 new failures)
- EstImated latency reduction: ~30% under concurrent load
…ptimization

- Configured perMessageDeflate with Z_BEST_SPEED (Level 1) and 256-byte threshold
- Optimized for 200+ concurrent classroom connections
- Added environment-based worker pool fallback (dev: direct compiler, prod: worker pool)
- Fixed ESM compatibility in compilation-worker-pool.ts

Bandwidth reduction: ~37% for typical simulation sessions
E2E tests: 3/3 passing (17.8s)

Addresses classroom scalability (Phase 0.2)
- Added simple-load-test.mjs for manual load testing (50/200 clients)
- Updated CLASSROOM_METRICS.json with Phase 0.2.5 results
- Fixed compilation-worker-pool.ts to fallback .js -> .ts for tsx compatibility
- Added @vitest-environment node directive to load test files
- Created PHASE_0.2.5_LOAD_TEST_REPORT.md with comprehensive analysis

Results:
- 200 concurrent clients: 100% success rate ✅
- WebSocket compression: Active (perMessageDeflate) ✅
- Worker Pool: Not testable in tsx (ESM @shared/* limitation), validated in Phase 0.1 ✅
- Compilation cache: ~99.5% latency reduction (10s → 50ms)

Phase 0.1 + 0.2 merged to performance branch, ready for Phase 0.3 approval
@ttbombadil ttbombadil merged commit 93db787 into main Mar 2, 2026
4 checks 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

Development

Successfully merging this pull request may close these issues.

1 participant