Skip to content
Snippets Groups Projects
user avatar
cfiehe authored
Fixes #1503: vmware_tag_manager: Tag processing is very slow

SUMMARY
Fixes #1503
This fix solves the performance issue during tag processing.
Signed-off-by: default avatarChristoph Fiehe <c.fiehe@eurodata.de>
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME
vmware_tag_manager
ADDITIONAL INFORMATION
Instead of iterating over the full set of available tags, it is possible to limit the requested set, so that only tags are returned that belong to the specified Category Id.
The performance issue is caused by this loop:
for tag_object in self.api_client.tagging.Tag.list():
    [...]

It can be replaced by:
for tag_object in self.api_client.tagging.Tag.list_tags_for_category(category_id):
    [...]

Reviewed-by: default avatarMario Lenz <m@riolenz.de>
53abe6c1
History
Name Last commit Last update