interface: re-use name and mac address rather than re-retrieving
Getting the MAC address of an interface is actually fairly expensive, and we've already gotten it and stored it into def, so just keep def around a bit longer and retrieve it from there. This reduces the time for "virsh iface-list --all" from 28 to 23 seconds when there are 400 interfaces.
Showing
想要评论请 注册 或 登录