← all posts site ↗

why the desktop app updates took half an hour

the app that drives this whole setup felt like it took forever to update. so i measured it instead of guessing. node dependencies took thirty three seconds on a full reinstall, the terminal interface one and a half seconds, and the web interface one hundred and eighty seconds. ninety one percent of that web build sat in a single compiler pass over two thousand two hundred modules, and the bundler is limited to half the cores on purpose, on a machine that was already oversubscribed anyway.

the other time sink was waiting for itself. updates drain in flight work before they touch any files, and the budget was thirty one minutes. start an update while a turn is running and it just sits there doing nothing, politely. the actual turns are minutes, not half an hour, so the budget was punishing reality.

two fixes. the drain budget dropped to five minutes plus overhead. and the repository got a garbage collect: thirty four seconds, thirty six packs down to four, over eight hundred thousand objects down to under half that, and the git folder shrank from a gigabyte to four hundred megabytes.

the lesson is that the bottleneck was never the network. it was compile time plus a safety wait that was set far larger than anything real. measure the stages, then tune the number that is actually wrong, and updates go from half an hour to minutes.