mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-13 08:05:23 +00:00
Add optional isolate pool to reduce V8 cold start overhead: - Pool of dedicated threads, each with pre-created isolates - Enabled via NATIVETS_ISOLATE_POOL=true environment variable - Pool size = NUM_WORKERS + 1 (one spare ready while others in use) - Fresh isolate per job (no state leakage between jobs) - After job completes, isolate dropped and thread waits for next job Implementation: - Add crossbeam-channel for job dispatch to pool threads - Pool initialized once at worker startup (in run_workers) - Fallback to spawn_blocking when pool not enabled - Add pool status/stats functions for monitoring Tests: - Add pool status reporting test - Add sequential benchmark test (compare with/without pool) - Add high concurrency stress test (20 parallel jobs) To test: # Without pool (baseline) cargo test --features deno_core test_benchmark_sequential_jobs # With pool NATIVETS_ISOLATE_POOL=true cargo test --features deno_core test_benchmark_sequential_jobs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Windmill Backend
This folder holds all backend components, the src/ folder only contains files used to build the "root" binary.
Components
| name | description |
|---|---|
| windmill-api | The API server, exposing functionality to other components and the frontend |
| windmill-audit | Contains audit functionality, allowing different components to record important actions |
| windmill-common | Common code shared by all crates |
| windmill-queue | Contains job & flow queuing functionality, commonly written to by the API server and read from by workers |
| windmill-worker | The worker. Used to process and execute flows & jobs. |
| parsers | Contains code to parse signatures in different langauges. |
Compile sqlx for offline ci
cargo sqlx prepare --workspace -- --bin windmill --features enterprise