Description
opencode startup started to be painfully slow (~40s) in certain conditions.
Problem shows when working directory contains many subdirectories (e.g. a parent dir with hundreds of git repos).
What's the real-life usecase? In our company we have hundreds of microservices and oftentimes to achieve a goal you need to touch a few. I have all of them cloned locally just in case, and always open opencode from main directory.
I narrowed down the culprit to v1.4.4, I'm almost sure it's #21703. The PR says that we switch to WASM but not why. @nexxeln what was your usecase?
Plugins
none (reproduced with empty config)
OpenCode version
1.4.6 (regression since 1.4.4)
Steps to reproduce
# Download v1.4.3
cd /tmp && curl -sL https://github.com/anomalyco/opencode/releases/download/v1.4.3/opencode-darwin-arm64.zip -o oc143.zip && unzip -o oc143.zip -d oc143
# Download v1.4.4
cd /tmp && curl -sL https://github.com/anomalyco/opencode/releases/download/v1.4.4/opencode-darwin-arm64.zip -o oc144.zip && unzip -o oc144.zip -d oc144
# Run benchmarks
cd ~/large-directory-with-many-repos
time /tmp/oc143/opencode debug skill > /dev/null 2>&1 # ~2.7s
time /tmp/oc144/opencode debug skill > /dev/null 2>&1 # ~54s
Screenshot and/or share link
No response
Operating System
macOS (Apple Silicon)
Terminal
iTerm2
Description
opencodestartup started to be painfully slow (~40s) in certain conditions.Problem shows when working directory contains many subdirectories (e.g. a parent dir with hundreds of git repos).
What's the real-life usecase? In our company we have hundreds of microservices and oftentimes to achieve a goal you need to touch a few. I have all of them cloned locally just in case, and always open
opencodefrom main directory.I narrowed down the culprit to v1.4.4, I'm almost sure it's #21703. The PR says that we switch to WASM but not why. @nexxeln what was your usecase?
Plugins
none (reproduced with empty config)
OpenCode version
1.4.6 (regression since 1.4.4)
Steps to reproduce
Screenshot and/or share link
No response
Operating System
macOS (Apple Silicon)
Terminal
iTerm2