Skip to content

Conversation

@djay
Copy link
Collaborator

@djay djay commented Sep 12, 2022

No description provided.

@drinfernoo
Copy link
Owner

drinfernoo commented Sep 12, 2022

@djay Kind of a weird way to do it, but I was on the move... I pushed a change that lets us not run manage.get_path_by_id twice in the success case. If you think that looks ok, we can merge this one, and I'll push a version bump.

EDIT: Looking a tiny bit closer, in this instance, we call into this bit of code:

def find_defined_paths(group_id=None):
if group_id:
filename = "{}.group".format(group_id)
path = os.path.join(_addon_data, filename)
group_def = utils.read_json(path)
if group_def:
return group_def.get("paths", [])
else:
return []

That doesn't look particularly performance heavy, but it may still be a good idea to try and spare calls to it, since it is reading from disk.

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.

3 participants