Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: pettershao-ragilenetworks pettershao@ragilenetworks.com
What I did
fix sonic-net/sonic-buildimage#7136
How I did it
In testing, I found that ' port_util.get_vlan_id_from_bvid' will do many db actions to get vlan id, this really take times, so I store it temporarily when find the mapping info at first time, and use it when try to find vlan id for same bvid later.
How to verify it
big datastream, and show mac.
Previous command output (if the output of a command-line utility has changed)
before change, it takes long time .(5k, up to 15 seconds)
New command output (if the output of a command-line utility has changed)
after change, it takes only a while(5k, less than 1 seconds)