speedup discojson generation by 40%