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

Conditionally (defaults to true) add install counts to app list view. #454

Merged
merged 1 commit into from Jul 28, 2023

Conversation

sheagcraig
Copy link
Contributor

This PR returns the "install count" column to the Application Inventory list view. It adds the ability to decide not to show it based on a setting (which you add to the database, typically via the admin panel).

Also, this changes the method by which install counts are calculated. We
used to annotate the entire queryset. This unfortunately would get run
more than once, so performance impact was compounded.

Now, we instead use the .count method for each row, which then only
gets run for the rows displayed (page length defaults to 20 I think).

In my testing, these individual counts are very fast, so the addition of
install counts is a minor part of the total query time.

Long term, if this solves the performance issues for even large
deployments, we could just remove the dynamic determination of whether
to include the column or not.

Only counts the current page's apps instead of the entire queryset.
@sheagcraig sheagcraig merged commit 4cc989a into main Jul 28, 2023
2 checks passed
@sheagcraig sheagcraig deleted the optional_install_counts branch July 28, 2023 15:44
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.

None yet

1 participant