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
- GPT-6 Astra beats Factorio with enemies in 44 in-game hours at ~$4,500 API cost — liminal_bardo · 2026-09-11
- Treating agents like 50 First Dates: a 3-layer context system so every conversation doesn't start from zero — evielync · 2026-09-11
- SmolVM open-sources persistent computer infrastructure for agents that outlive chat sessions — aniketmaurya · 2026-09-11
- ARRM targets silent economic regressions in AI agents that functional tests miss — Beautiful_Belt_601 · 2026-09-11
- Dev builds browser 3D pizza delivery game with Claude: physics, GPS pathfinding, traffic AI — vinishkapoor · 2026-09-11
- Build X Carousel Posts from One Wide Image: A Splitter Tool Plus YouMind Skill Workflow — sujingshen · 2026-09-11