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
Avoid creating async_register_repository tasks to register_unknown_repositories #3536
Conversation
first call takes 0.00011390098370611668s await in series seems like a better option here |
need to do a fresh install to make sure this is ok |
if you do that you should tick the last box in the flow to enable experimental not to give yourself a GitHub rate limit break 😄 |
This works well on a fresh install as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
I'm currently in the process of changing things around with actions and testing, so If you do not mind I will leave it as-is (open) until that is complete so this can be run against that as well.
It will still go in the next version.
Its been a problem for years and we have lived with it so no rush at all. |
constructing enums can be oddly slow because they are singletons that have to find the object don't know if translates to real world savings, but first attempt to make it faster would be: diff --git a/custom_components/hacs/repositories/integration.py b/custom_components/hacs/repositories/integration.py
index 70b8b547..72fe5f6b 100644
--- a/custom_components/hacs/repositories/integration.py
+++ b/custom_components/hacs/repositories/integration.py
@@ -18,6 +18,7 @@ from .base import HacsRepository
if TYPE_CHECKING:
from ..base import HacsBase
+CATEGORY_INTEGRATION = HacsCategory.INTEGRATION
class HacsIntegrationRepository(HacsRepository):
"""Integrations in HACS."""
@@ -27,7 +28,7 @@ class HacsIntegrationRepository(HacsRepository):
super().__init__(hacs=hacs)
self.data.full_name = full_name
self.data.full_name_lower = full_name.lower()
- self.data.category = HacsCategory.INTEGRATION
+ self.data.category = CATEGORY_INTEGRATION
self.content.path.remote = "custom_components"
self.content.path.local = self.localpath
|
That will eventually be set as a class instead of an instance attribute. |
WalkthroughWalkthroughThe Changes
Assessment against linked issues
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional comments not posted (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Await these in series to avoid creating tasks as they are unlikely to suspend.
fixes #3535