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

fix slow query in NamespaceGet #3707

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

heiytor
Copy link
Contributor

@heiytor heiytor commented Apr 9, 2024

Currently, NamespaceGet method calculates the total number of devices in a namespace, which may result in a slow query. Since this method is utilized in numerous contexts where the Namespace.DevicesCount attribute isn't required, we are introducing an optional parameter, countDevices, to the method. This allows the slow query to be executed only when necessary.

@heiytor heiytor self-assigned this Apr 9, 2024
@heiytor heiytor force-pushed the fix/namespaceGet-slow-query branch from 6692872 to 8d28c37 Compare April 9, 2024 14:35
@heiytor heiytor removed the area/cli label Apr 9, 2024
@heiytor heiytor marked this pull request as ready for review April 9, 2024 14:35
@heiytor heiytor requested a review from a team as a code owner April 9, 2024 14:35
Currently, `NamespaceGet` method calculates the total number of devices
in a namespace, which may result in a slow query. Since this method is
utilized in numerous contexts where the `Namespace.DevicesCount`
attribute isn't required, we are introducing an optional parameter,
`countDevices`, to the method. This allows the slow query to be executed
only when necessary.
@heiytor heiytor force-pushed the fix/namespaceGet-slow-query branch from 8d28c37 to 5c0e87e Compare April 9, 2024 14:42
@gustavosbarreto gustavosbarreto merged commit ac8b08b into master Apr 9, 2024
9 checks passed
@gustavosbarreto gustavosbarreto deleted the fix/namespaceGet-slow-query branch April 9, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants