Better way to set large arrays (patch by Ken Yamaguchi, RT #97359)