Improve speed when adding hosts