script generation speedup: 0.1829s -> 0.1399