Bug 296368 - add an image - updating the number in the resource box takes long
Summary: add an image - updating the number in the resource box takes long
Status: RESOLVED FIXED
Alias: None
Product: Active
Classification: Plasma
Component: Contour activity screen (show other bugs)
Version: PA 2
Platform: Meego/Harmattan Linux
: NOR minor
Target Milestone: unscheduled
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-19 15:16 UTC by Fania Bremmer
Modified: 2013-02-05 18:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fania Bremmer 2012-03-19 15:16:46 UTC
on 2012-03-19-10-07-basyskom-plasma-active-devel-meego-usb-live.iso 

- tap the add resource button
- add  5 images
- see the resource box beeing created with the display number "1". wait for 3 seconds and see it getting updated to "5"

expected outcome:
-> this is a new bug, before it displayed the right number right away. Can we hide the number, until the loading is finished and only show the final, correct number? It looks very slow-going to see the counter go up in 3 seconds
Comment 1 Lamarque V. Souza 2012-03-21 15:47:16 UTC
This is probably related to the slow thumbnail generation problem Marco talked about yesterday. The "Connect -> Activities" menu in share-like-connect also becomes slower and slower to show up as more resources are added. I noticed a lot of dbus error messages using dbus-monitor:

method call sender=:1.11 -> dest=org.kde.nepomuk.DataManagement serial=258 path=/resourcewatcher/watch8; interface=org.kde.nepomuk.ResourceWatcherConnection; member=addResource
   string "nepomuk:/res/555f6c82-2663-4ce3-998b-74a42798359e"
error sender=:1.10 -> dest=:1.11 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=258
   string "No such method 'addResource' in interface 'org.kde.nepomuk.ResourceWatcherConnection' at object path '/resourcewatcher/watch8' (signature 's')"
Comment 2 Lamarque V. Souza 2012-03-21 17:58:30 UTC
I asked Marco and he pushed a patch to obs to workaround the thumbnail generation problem. The patch also fixed the dbus error messages above and adding images are faster now. I cannot even notice the number changing now.

By what I could see in the patch the problem is related to Nepomuk's cache, so everything that uses Nepomuk is affected by this bug. According to Marco there are still ongoing discussion about what is the best way to fix this bug, so we may need to update the patch in the future. For now, I suggest  updating to the following packages that include the mentioned patch:

libnepomukutils-4.8.0+git20120313.095935-4.1.Project.KDE.Devel
libnepomukquery-4.8.0+git20120313.095935-4.1.Project.KDE.Devel
libnepomuk-4.8.0+git20120313.095935-4.1.Project.KDE.Devel
Comment 3 Marco Martin 2012-03-22 09:51:19 UTC
should work ok, now, i also see the final patch has been pushed in kdelibs too so i'll get kdelibs pushed without the extra patch asap
Comment 4 Fania Bremmer 2012-03-27 16:27:40 UTC
tested on 2012-03-27-15-24-basyskom-plasma-active-testing-meego-usb-live.iso,
here its still a slow number display
Comment 5 Lamarque V. Souza 2012-04-04 17:25:32 UTC
I have been investigating how we could update the number of entries only at the "end of new entries" event but there is no accurate way of doing that. Nepomuk and dataengines do not send a "end of new entries" signal, so we have to rely on an timeout to determinate the interval when the "end of new entries" happen. Choosing the timeout value is the problem here because it must be long enough to allow nepomuk to send new entries and not to too long to avoid updating the containment's title several seconds after the "end of entries" event happens. According to the bug description 3s would not be long enough but I think 3s is too much time to update the containment's title.
Comment 6 Thomas Pfeiffer 2013-02-05 18:30:47 UTC
The number is now updated at the same time that the items appear in the box.