Typically I don’t want to make devlogs for small stuff like this, but this is something I found really cool.
So I was working on help messages for all the commands when I realized that mocha bucket list felt a bit slower than pretty much every other command.
This is because we need to shell out to git 2 times per bucket, and I had 4 buckets added. While 8 git commands might not sound like a lot, it was enough to make mocha bucket list feel slow.
So what I did is I parallelized the metadata fetching through an errgroup. Instead of fetching the metadata for each bucket in order, we fetch the metadata for all 4 buckets simultaneously.
This led to a big performance uplift. About 3 times faster than the old version of mocha, and just over 12 times faster than scoop for this operation. See the video below.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.