ensure_chunks performance improved