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

Collect Anatomy Object: avoid AddonsManager reinitialization #677

Open
2 tasks done
BigRoy opened this issue Jun 19, 2024 · 1 comment
Open
2 tasks done

Collect Anatomy Object: avoid AddonsManager reinitialization #677

BigRoy opened this issue Jun 19, 2024 · 1 comment
Labels
type: enhancement Improvement of existing functionality or minor addition

Comments

@BigRoy
Copy link
Collaborator

BigRoy commented Jun 19, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Please describe the feature you have in mind and explain what the current shortcomings are?

The Collect Anatomy Object plug-in creates an Anatomy instance to the context. Which in its turn seems to initialize an AddonsManager to retrieve the current site for that anatomy?

This clutters the publish logs, and also seems to re-initialize more than is needed because the Addons are already collected prior, by the Collect Addons plug-in.

It would be great if we could somehow avoid the sitesync addon logic in Anatomy or somehow be able to pass along into Anatomy object the pre-initialized addons manager to avoid the extra initializing.

How would you imagine the implementation of the feature?

  1. Avoid the need for the AYON addon manager initialization in Anatomy instance creation.
  2. Or pass the relevant data to the object on __init__ to avoid the initialization pass if e.g. you pass it the addon manager.

Are there any labels you wish to add?

  • I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:

Live with cluttered logs. :)

Additional context:

It's not critical at all - would just be nice to optimize/clean this up.

@BigRoy BigRoy added the type: enhancement Improvement of existing functionality or minor addition label Jun 19, 2024
@BigRoy
Copy link
Collaborator Author

BigRoy commented Jun 19, 2024

Side note: the site sync addon is currently cached globally on the Anatomy object so the initialization may only occur every 60+ seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

No branches or pull requests

1 participant