Optimized performance by changing the list to array in XRaster