Number of "other technical items" is inaccurate

Bug #605446 reported by Matthew Paul Thomas
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
Medium
Matthew Paul Thomas

Bug Description

Binary package hint: software-center

software-center trunk r906, Ubuntu 10.04

1. Navigate to "Canonical Partners".
2. Observe that the status bar says "7 items available", while the disclosure bar offers "34 other technical items".
3. Click the link in the disclosure bar.

What happens: The status bar says "34 items available".

7 + 34 ≠ 34.

What should happen:
2. The disclosure bar should offer "27 other technical items".

<mvo> there are 34 more packages, but we hide e.g. the uex package because we show the ultraedit application already
<mvo> but the query does not know that just yet, I guess for this small amount we can calculate wihtout a fuss, for the big (32000 technical items) query its not workable
<mpt> oh?
<mvo> its just the effect of the de-duplciation that you see here
<mvo> (i.e. Applicaton Abiword "shadows" package abiword)
<mpt> sure
<mpt> So the de-duplication is too slow to do it when first displaying the list?
<mvo> yes, because it requires going over the results and collecting the package names
<mvo> for 30k entries that is ~3-4sec on my machine
<mvo> so we cheat and just show the amount of packages without considering de-duplication at this point
<mvo> I guess we could try to build a more clever query too, its worth a shoot
<mvo> but essential the problem is that we need to compare set(pkgnames-in-current-view) with set(pkgnames-in-query-result)
<mpt> and/or, say just "Show other technical items" until the query has finished and we can say "Show 20052 other technical items"
<mvo> that is another possibility, we could also approximate, when displaying "1000 apps" and we have "32k" pkgs we could say "show about 31k more technical items (assuming the average number of app/pkg is about 1
<mpt> Ok, I'll report a bug for myself to spec this
<mvo> or "show more than 31k-1 technical items" (because at most each app is in one pkg)

Changed in software-center (Ubuntu):
assignee: nobody → Matthew Paul Thomas (mpt)
Revision history for this message
Michael Vogt (mvo) wrote :

I did did a little bit of playing with the numbers for a approximation, for the whole archive it would be "more than 29315 technicals items available" when in fact the number is 29420 (so off by about 100)
 not too bad IMO given the total numbers and its instant

Revision history for this message
Kiwinote (kiwinote) wrote :

I have solved this for the channel panes (ie Canonical partners etc). The issue however still remains in the category list views (ie Get Software > Developers Tools > All). Now that we have show and hide action bars this is quite visible.

Changed in software-center (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Kiwinote (kiwinote) wrote :

This should all work nicely now (minus a few really small side cases).

Changed in software-center (Ubuntu):
status: Triaged → Fix Released
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.