Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize for best candidate find #1399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

inspurSDN
Copy link

why I did:
in best candidate, it looking for all items of this type to search
for the most seamful item, when their is too many vlan member, we
can wait very long.
what I did:
since VLAN and VLAN MEMBER is unique, so if we find one with all attr
matched, we break and do not compare others.

why I did:
    in best candidate, it looking for all items of this type to search
    for the most seamful item, when their is too many vlan member, we
    can wait very long.
what I did:
    since VLAN and VLAN MEMBER is unique, so if we find one with all attr
    matched, we break and do not compare others.
Copy link
Collaborator

@kcudnik kcudnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address comments

@@ -1886,6 +1886,9 @@ std::shared_ptr<SaiObj> BestCandidateFinder::findCurrentBestMatchForGenericObjec
soci.equal_attributes);

candidateObjects.push_back(soci);
if (soci.equal_attributes == attrs.size()
&& (object_type == SAI_OBJECT_TYPE_VLAN || object_type == SAI_OBJECT_TYPE_VLAN_MEMBER))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is object specific, please remove it from this place and add object specific logic for finding best candidatte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants