Menu

Running bd commands in parallel was slower than running them in turn
📰

Running bd commands in parallel was slower than running them in turn

DEV Community: typescript·Jean Pierre·18 days ago
#OyPQlii0
#devtotypescript#devto#dev#project#calls
Long article (564 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.