Skip to content

Optimize package search #460

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alexkuz
Copy link
Contributor

@alexkuz alexkuz commented Apr 13, 2025

  • call installer.get_description() with for_search=True for faster search (I'm not 100% sure what's the difference in terms of searching but it seems appropriate and the performance gain is very noticeable*)
  • cache name, summary, description etc. for each package for faster consequent searches
  • pre-generate search cache in background when installer is ready
  • reset page to landing if search input is empty
  • cancel current search if user navigated back to landing
  • minor performance improvements (iterate through packages without redundant allocations)

UPD:

  • improve search performance more with CooperativeIterator
  • show progress bar on package search instead of spinner
Before After
simplescreenrecorder-2025-06-01_13.42.01.mp4
simplescreenrecorder-2025-06-01_13.27.04.mp4

--
*) 12s vs 200s on my machine

@alexkuz alexkuz force-pushed the optimize-package-search branch from 301778e to c16fb3f Compare April 13, 2025 23:36
@alexkuz alexkuz force-pushed the optimize-package-search branch from e83a0ad to c33b13d Compare June 1, 2025 11:25
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.

1 participant