Use a buffered Writer with json.Encoder. This improves the execution speed for most larger files by 25-30%