mjakeman / extension-manager

A utility for browsing and installing GNOME Shell Extensions.
https://mattjakeman.com/apps/extension-manager
GNU General Public License v3.0
1.01k stars 80 forks source link

Performance: Don't launch an initial search on an empty SearchEntry #691

Open nekohayo opened 3 months ago

nekohayo commented 3 months ago

Describe the bug

Currently, the app launches a search immediately the first time you switch to the "Browse" tab, even if the user hasn't typed anything, and this empty search takes a very long time (ex: 30 seconds or so) with the spinner active throughout this time. This should not happen:

https://github.com/user-attachments/assets/c21fdbe5-3244-47ef-aeab-7afa3e7acac2

System Information:

oscfdezdz commented 1 month ago

For context, this happened because the servers were down for maintenance and apparently it took longer than expected and affected other services, see https://discourse.gnome.org/t/planned-maintenance-ocp-cluster-25th-of-july-2024-8-am-12-pm-utc/22321/8

Regardless, as you mentioned in https://github.com/mjakeman/extension-manager/issues/672#issuecomment-2250153961, we should show a warning when there is a problem with the servers.

To avoid launching an initial search when switching to the Browse tab, maybe we could cache the most popular extensions from time to time. Although it seems that the Extensions website does an initial search every time, just like we do.