chunk generator optimalization