script generation speedup: 0.2345s -> 0.2185