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

Speed up initialization by optimizing package sorting #412

Closed
wants to merge 1 commit into from

Conversation

alexkuz
Copy link
Contributor

@alexkuz alexkuz commented Feb 18, 2024

Calling pkginfo_is_installed on every package, especially in sorter function, turned out to be pretty expensive. The package sorting is optimized by getting installation info in batch (note that "internal" installer._apt and installer._flatpak modules are used - should it be a patch for mintcommon?)

Before:

Application.do_activate took 16899.680 ms

After:

Application.do_activate took 7158.331 ms

@mtwebster
Copy link
Member

Nice - I've been wanting to look into the slow startup for a while. I know that sort for top-rated apps was heavy, maybe not worth what we get out of it.

Yeah we could probably do with an installer method for fetching installed refs just to avoid accessing _flatpak and _apt directly, with a pkg_type argument.

@mtwebster
Copy link
Member

Merged:
fb666cf

Thanks

@mtwebster mtwebster closed this May 2, 2024
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.

2 participants