Search making excessive requests for snap details and search

Bug #1756184 reported by Bret Barker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-software (Ubuntu)
Fix Released
High
Robert Ancell

Bug Description

If you turn on snapd debugging and watch the log, you will see some excessive hits when working in Gnome Software. In particular, it seems:

- Search makes the search request and then a details hit for every result
- After clicking into a snap detail page and returning to the list, the query is repeated.

Details requests should only be needed when clicking on a result, and returning to the search results should not repeat the query.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

To enable snapd HTTP debugging:

in /etc/environment:
SNAPD_DEBUG=1
SNAPD_DEBUG_HTTP=7
and restart snapd

Changed in gnome-software (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
importance: Undecided → High
Revision history for this message
Robert Ancell (robert-ancell) wrote :
Changed in gnome-software (Ubuntu):
status: New → In Progress
Changed in gnome-software (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.28.0-0ubuntu4

---------------
gnome-software (3.28.0-0ubuntu4) bionic; urgency=medium

  * debian/patches/0001-Stop-searching-multiple-times-on-search-page.patch:
    - Stop duplicate search queries (LP: #1756184)

 -- Robert Ancell <email address hidden> Fri, 16 Mar 2018 12:21:56 +1300

Changed in gnome-software (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Bret Barker (noise) wrote :

That change only fixes the case of returning from search results (confirmed fixed as above), but not the n+1 API requests for the initial search + details of each result.

Note this is particularly noticeable on initial launch where I currently see a total of 80 requests: 5 searches for different sections and the details hits for each search result.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

3.28.0-0ubuntu5 should now not do a detail request for each of the featured snaps (uses the metadata from the search result instead). It will now do a detail lookup the first time you click on a snap.

Note that we do still do a detail lookup on each installed snap when you start - this is a long standing issue due to the icon information not being reliable on local snaps. If these requests are an issue we should tackle that in another bug.

Revision history for this message
Bret Barker (noise) wrote :

Much better, thanks Robert!

I think we can live with the installed snaps requests for now.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I'm about to land a change to master that will use the .desktop file icons when available - this should make it into Bionic and further decrease the server load.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.