Using scale
fixed it. Looked like threading because several threads would run and complete quickly, then appear to get increasingly bogged down, even if they weren't asking for a lot of samples. But I think it was just generating progressively large strings the longer it ran. Once I limited the size of the strings, everything went fine.