network improvements

cpu consumption was >100%. with the sleep(10) in the thread, this went
down to <40%