Yeah, I love Ruby and when I need perf itβs easy enough to write something in C or Rust and call it via FFI. But this code spends the vast majority of its time waiting on the network.
I was able to run the same code single threaded on my M1 Mac against a local copy of the PostgreSQL DB and it only took 1 hour. But adding the network slowed it down by a factor of 24, hence the need for multiple threads.
Itβs always easy to forget just how slow even the fastest network is until you run head first into the problem again. π€£