Based on the difference in efficiency shown by the attached patch, I think an easy win would be to simply change the implementation of _check_instance_not_already_created() to instead check to see if the driver supports a lookup by Name, and if so, use that.
Based on the difference in efficiency shown by the attached patch, I think an easy win would be to simply change the implementation of _check_ instance_ not_already_ created( ) to instead check to see if the driver supports a lookup by Name, and if so, use that.