Chunk generation optimization