bd board is a local dashboard for bd (beads), the issue tracker that keeps its data in your repo. It has no database of its own: every screen is built by shelling out to the bd CLI, and one page can need several calls for the beads, the statuses, the epics and the knowledge entries.
Those calls do not depend on each other, so the first version ran them at the same time. Running them one after another turned out to be faster.
Why parallel is slower
bd uses an embedded Dolt database, and Dolt locks it while a process works. Concurrent calls on the same project end up waiting for each other, and together they take longer than the same calls run in turn.
I checked with six calls of bd list --json --limit 0 on one project, three rounds each, on bd 1.3.4:
| Run | One after another | In parallel |
|---|---|---|
| 1 | 1873 ms | 2303 ms |
| 2 | 1855 ms | 2186 ms |
| 3 | 1885 ms | 2051 ms |
Parallel was 10 to 20 percent slower, and no call failed. The project was small, so I would expect the gap to grow on a bigger one, but I have not measured that.
One queue per project
The server keeps a promise chain per project directory. A call waits for the previous call on the same project, while calls on different projects still run in parallel because they use different databases.
const dirQueues = new Map<string, Promise<void>>() export function inTurn<T>(dir: string, run: () => Promise<T>): Promise<T> { const previous = dirQueues.get(dir) ?? Promise.resolve() const result = previous.then(run) const tail = result.then(() => undefined, () => undefined) dirQueues.set(dir, tail) void tail.then(() => { if (dirQueues.get(dir) === tail) dirQueues.delete(dir) }) return result } The tail swallows errors on purpose, so one failed call does not block the ones queued behind it. The map entry is deleted once the chain is idle, so the map does not grow with every project you open.
Two changes that went with it
bd statuses is cached per project for 60 seconds, and saving custom statuses clears the cache.
In the desktop app, a Tauri shell around the same UI, every command now runs off the main thread, so the window stays responsive while bd works.
See where the time goes
To check this on your own projects, start bd board with BD_BOARD_TIMING=1. It logs every bd call to stderr with its queue wait and its run time:
[bd wait 0ms run 312ms] list --json --limit 0 (my-project) A long wait means calls are queuing for the lock. A long run means bd itself is slow on that project.
Measure before assuming parallel is faster: when a tool takes a lock, the lock sets the speed, and more concurrency only adds waiting.
bd board is MIT licensed and runs as a web app or as a Tauri desktop app: https://github.com/jeanpfs/bd-board

