Sped up writing trending to file

1/3 what it was.