Qwen Code lazily loads three dependencies and cuts cold-start time by 144 ms
gitmeatarru · ghdev · 2026-07-24
Qwen Code’s core runtime now lazy-loads three heavy first-use dependencies: iconv-lite, @xterm/headless, and simple-git.
- The PR moves them out of the ACP child’s eager static import closure and loads them only when first needed.
- It preserves synchronous encoding helpers via a compatibility entry while switching internal paths to async lazy variants.
- Terminal construction is deferred until the PTY path is selected, and Git service setup remains side-effect-free until a Git operation is actually needed.
- On the prototype artifact, the static closure shrank by about 890 KiB, process-to-first-session P50 improved from 1877.7 ms to 1733.3 ms, channel.initialize P50 from 896.2 ms to 831.5 ms, and peak RSS P50 from 417.0 MB to 408.1 MB.
More from coding & agent
- NVIDIA says Nemotron 3 Ultra hit 97.1% on agentic RTL chip-design tasks — NVIDIAAI · 2026-07-27
- Tokyo Agent Forge hackathon shipped production-ready AI agents in one day — DavidBennett__ · 2026-07-27
- Long-running agents will need immutable event logs, this thread argues — sebpaquet · 2026-07-27
- Agentic Data Science in Practice: Agents Write Code but Answer Wrong Questions — hugobowne · 2026-07-27
- A VS Code extension adds Markdown-style highlighting to Alchemy string templates — samgoodwin89 · 2026-07-27
- Claude’s Stripe MCP connector is being called unusable after repeated disconnects — evielync · 2026-07-27