v1.1.0 — Gzip canvas compression + throttled sends
All checks were successful
CI / ci (push) Successful in 6m29s
All checks were successful
CI / ci (push) Successful in 6m29s
- Canvas snapshots gzip-compressed before sending: 1MB raw -> ~1-5KB for a mostly-white canvas, ~100-500KB for a busy one - Semaphore throttles concurrent canvas sends (default 20) to prevent memory spikes during connection bursts - Frontend decompresses gzip via browser DecompressionStream API - New config: MAX_CONCURRENT_CANVAS_SENDS (default 20) - Added flate2 dependency for gzip encoding
This commit is contained in:
@@ -127,7 +127,7 @@ fn build_app(
|
||||
state: Arc<AppState>,
|
||||
config: &AppConfig,
|
||||
) -> Result<axum::Router, Box<dyn std::error::Error>> {
|
||||
let ws_router = websocket::build_router(state);
|
||||
let ws_router = websocket::build_router(state, config.server.max_concurrent_canvas_sends);
|
||||
let http_router = http_axum::build_router(config.server.enable_cors, &config.rate_limit)?;
|
||||
Ok(ws_router.merge(http_router))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user