Optimized chunk generation