mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Replace `clone()` with `take()` when retrieving device configurations from `DeviceManager.config`. This avoids unnecessarily copying the device configuration lists (e.g., `disks`, `net`, `fs`) when they are being processed and subsequently moved out of the configuration. This optimization improves performance by reducing memory allocations and cloning overhead. Signed-off-by: Changyuan Lyu <changyuanl@google.com>