Unity dash file search is extremely slow

Bug #919801 reported by Doughy
352
This bug affects 77 people
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Incomplete
Undecided
Unassigned
unity-lens-files
Incomplete
Undecided
Unassigned
unity-lens-files (Ubuntu)
Confirmed
Low
Unassigned
zeitgeist (Ubuntu)
Fix Released
Medium
Marco Trevisan (Treviño)

Bug Description

When I try to use the Unity dash search feature to navigate to files and folders, it is extremely slow. For example, if I hit the super button to launch the search and then type "Pictures" to get my pictures directory, it takes almost 5 seconds for the folder icon to show. In comparison, if I use Gnome-Do to navigate to my Pictures folder, it's basically instant.

I have attached a video screencast so that you can see the problem for yourself.
---
ApportVersion: 1.23-0ubuntu4
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,compiztoolbox,decor,move,vpswitch,place,session,imgpng,mousepoll,resize,gnomecompat,regex,snap,grid,wall,unitymtgrabhandles,animation,expo,ezoom,workarounds,fade,scale,unityshell]
DistroRelease: Ubuntu 11.10
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110413)
NonfreeKernelModules: nvidia
Package: unity 5.0.0~+bzr1825ubuntu0+611
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
Tags: oneiric running-unity
Uname: Linux 3.0.0-14-generic i686
UnreportableReason: This is not a genuine Ubuntu package
UpgradeStatus: Upgraded to oneiric on 2011-10-14 (99 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Doughy (doughywilson) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/919801/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Phil. V (philip.v) wrote :

Thanks for your bug report. I'll package this against Unity, as I've seen other bugs regarding the search feature packaged as such. Could you please run the following command in a terminal to attach some system information to this report: 'apport-collect 919801'.

affects: ubuntu → unity (Ubuntu)
Changed in unity (Ubuntu):
status: New → Incomplete
Revision history for this message
Doughy (doughywilson) wrote : Dependencies.txt

apport information

tags: added: apport-collected oneiric running-unity
description: updated
Revision history for this message
Doughy (doughywilson) wrote : GconfCompiz.txt

apport information

Revision history for this message
Phil. V (philip.v) wrote :

Thanks for running apport. I'm not really familiar with debugging problems like this, but hopefully there's enough information here for someone more informed to see what's wrong.

Changed in unity (Ubuntu):
status: Incomplete → New
Revision history for this message
Omer Akram (om26er) wrote :

thanks for the bug report. Can you login to a guest session or create a new user account and try to reproduce the problem there and let us know if the results.

Changed in unity (Ubuntu):
status: New → Incomplete
Changed in unity:
status: New → Incomplete
Revision history for this message
Doughy (doughywilson) wrote :

I tried both a Guest account and another user account on my same machine. In both cases, the search function returned nothing when I searched for a particular folder, even though I verified that the folders I searched for did in fact exist within that user's home directory. I even searched for the default directories like "Pictures" and "Videos" but it came back with nothing. The only time it worked was when I tried "Home" and it popped up quickly.

Revision history for this message
Doughy (doughywilson) wrote :

I take that back. It now appears to be working for the default user directories like "Pictures" and "Videos." However, other directories only worked if I manually created a bookmark in Nautilus. The search returned results quickly, so I did not experience the problem of lag on the other user account.

Revision history for this message
Doughy (doughywilson) wrote :

I should clarify... I still have the original problem on my user session. However, the lag problem does not happen with other user accounts on the same machine.

Revision history for this message
Doughy (doughywilson) wrote :

The problem seems to be with the zeitgeist-daemon. When I search for my folders, I watch my CPU usage and zeitgeist-daemon goes up significantly until the folder is found.

Revision history for this message
Doughy (doughywilson) wrote :

I may have found a solution. I went into my ~/.local/share/zeitgeist folder and deleted all contents. I then ran "zeitgeist-daemon --replace" in a terminal to restart it, and things now work much faster when searching for those folders.

Now my complaint is that the folders in my home directory are not being indexed unless I add a bookmark in Nautilus. That may need to be filed in a separate bug.

Revision history for this message
Phil. V (philip.v) wrote :

Glad to see the problem was identified and resolved, I'll change the status back to new. Indeed, you should file a separate bug report regarding your indexing problem as it doesn't appear to be related to this.

Changed in unity (Ubuntu):
status: Incomplete → New
Changed in unity:
status: Incomplete → New
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Thanks for digging through this Doughy; I am not sure why Zeitgeist searches were slowing down, they are usually very fast. I'll attach a Zeitgeist task to check if anyone there have any ideas...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Omer Akram (om26er) wrote :

Thanks for taking time to report and helping to make ubuntu better. Its been a while since bug was reported, there have been alot of changes in Unity over the last couple of months. Can you please try the latest ISO of the Ubuntu 12.04 beta and let us know if the issue have been resolved for you.

Changed in unity:
status: New → Incomplete
Changed in zeitgeist:
status: New → Incomplete
Changed in unity (Ubuntu):
status: Confirmed → Incomplete
affects: unity (Ubuntu) → unity-lens-files (Ubuntu)
affects: unity → unity-lens-files
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for unity-lens-files (Ubuntu) because there has been no activity for 60 days.]

Changed in unity-lens-files (Ubuntu):
status: Incomplete → Expired
Changed in unity-lens-files (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Jan Rathmann (kaiserclaudius) wrote :

I have run into the same bug during the last months on Quantal. For quite some time I wondered whether it is normal that searching for files in the dash takes so long. After applying Doughy's hint to delete ~/.local/share/zeitgeist the dash file search has become much faster, so that helped als workaround for that bug.

Kind regards,
Jan

Revision history for this message
TomasHnyk (sup) wrote :

The same for me as for Jan Rathman on 12.10. The problem seems to be with zeitgeist.
~/.local/share/zeitgeist had the size of 182MB and was (I guess) couple of years old (this home directory dates back to 5.10 days). The new one is just 1.3MB. If the developers wish, I can send them the old zeitgeist directory (until I delete it) to play with, if it made any difference.

Revision history for this message
Seif Lotfy (seif) wrote : Re: [Bug 919801] Re: Unity dash file search is extremely slow

that would be great... Keep in mind a lot of good optimization are coming
out soon

On Tue, Jan 15, 2013 at 2:18 PM, TomasHnyk <email address hidden> wrote:

> The same for me as for Jan Rathman on 12.10. The problem seems to be with
> zeitgeist.
> ~/.local/share/zeitgeist had the size of 182MB and was (I guess) couple of
> years old (this home directory dates back to 5.10 days). The new one is
> just 1.3MB. If the developers wish, I can send them the old zeitgeist
> directory (until I delete it) to play with, if it made any difference.
>
> --
> You received this bug notification because you are subscribed to unity-
> lens-files.
> https://bugs.launchpad.net/bugs/919801
>
> Title:
> Unity dash file search is extremely slow
>
> Status in Unity Files Lens:
> Incomplete
> Status in Zeitgeist Framework:
> Incomplete
> Status in “unity-lens-files” package in Ubuntu:
> Confirmed
>
> Bug description:
> When I try to use the Unity dash search feature to navigate to files
> and folders, it is extremely slow. For example, if I hit the super
> button to launch the search and then type "Pictures" to get my
> pictures directory, it takes almost 5 seconds for the folder icon to
> show. In comparison, if I use Gnome-Do to navigate to my Pictures
> folder, it's basically instant.
>
> I have attached a video screencast so that you can see the problem for
> yourself.
> ---
> ApportVersion: 1.23-0ubuntu4
> Architecture: i386
> CompizPlugins:
> [core,bailer,detection,composite,opengl,compiztoolbox,decor,move,vpswitch,place,session,imgpng,mousepoll,resize,gnomecompat,regex,snap,grid,wall,unitymtgrabhandles,animation,expo,ezoom,workarounds,fade,scale,unityshell]
> DistroRelease: Ubuntu 11.10
> InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110413)
> NonfreeKernelModules: nvidia
> Package: unity 5.0.0~+bzr1825ubuntu0+611
> PackageArchitecture: i386
> ProcEnviron:
> PATH=(custom, no user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
> Tags: oneiric running-unity
> Uname: Linux 3.0.0-14-generic i686
> UnreportableReason: This is not a genuine Ubuntu package
> UpgradeStatus: Upgraded to oneiric on 2011-10-14 (99 days ago)
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/unity-lens-files/+bug/919801/+subscriptions
>

Revision history for this message
TomasHnyk (sup) wrote :

Well, I am afraid I will not be able to take advantage of them until 13.04 is released as I am on Quantal now (and backing up and then removing the directory made it fast).

How can I send it to you, would a link to you e-mail be sufficient? After all, I do not want to upload to the internet my whole browsing history and so on even if I do not mind if you have it.

Revision history for this message
Michal Hruby (mhr3) wrote :

You can open a new private bug targeted against lp:zeitgeist and attach the db to it.

Revision history for this message
TomasHnyk (sup) wrote :

Michal: done, bug 1100222

Revision history for this message
Colin Law (colin-law) wrote :

Are the optimisations released in Raring yet? I am still finding it slow at times.

Revision history for this message
Guillaume F (marsguo) wrote :

Same here in 13.04 (upgraded from 12.10). Whenever I perform a search in the Dash, "More suggestions" is the first category to appear, followed by "Application" and, much later, "Files".
Doughy's tip works great (thanks!) but the average user shouldn't be asked to come to this. I hope all the optimizations in 13.04 will keep this problem from happening again!

Revision history for this message
Lars Ola Liavåg (l-liavag) wrote :

According to this link (http://ubuntuforums.org/showthread.php?t=2106949), you could achieve the same by installing sqlite3 and performing:

cd .local/share/zeitgeist/
sqlite3 activity.sqlite vacuum

I'll be trying that on the worst of my three Ubuntu machines. On this one, I tried emptying ~/local/share/zeitgeist and I'm now down to a couple of seconds for the dash to populate the first time after login. It's not perfect but it's an improvement.

Revision history for this message
FuzzyQ (atomicfuzzyq) wrote :

This tweak speeds up things a little for me, thanks!
You can automate it by creating a cron-job, e.g. create a file in /etc/cron.daily/, name it "cleanupdash" or whatever you want and paste

#!/bin/sh
sqlite3 ~/.local/share/zeitgeist/activity.sqlite vacuum

into it. Save it, change permission

sudo chmod 744 /etc/cron.daily/cleanupdash

and it will auto-execute itself once every day.
Enjoy!

Revision history for this message
Lars Ola Liavåg (l-liavag) wrote :

Trying the sqlite vacuum command didn't work all that well even though I think it helped a little. It got even slightly better by deleting everything in the ~/.local/share/zeitgeist/ directory but still, Dash is quite slow to polulate the first time after login.

Now, the results of the files lens pop up after a couple of seconds and the applications results come after about five. The rotating magnifying glass in the search field indicates that there's still something pending, however, but I can't figure out what it is.

After having been used once, the Dash is fast and responsive. It's only a problem the first time after login, and I believe it's worst on the first login after reboot.

Revision history for this message
Guillaume F (marsguo) wrote :

Any progress on this issue? The tips worked to a certain extent, but did not fix it. The issue is with Unity and not Zeitgeist, since Synapse works fine and fast. This problem is crucial, because it undermines one of the main assets of the Dash: finding anything fast. I don't mind waiting for Amazon results, but not the documents I work on.

Revision history for this message
Petar Sredojevic (perosredo) wrote :

Can the importance/priority be escalated here?

Revision history for this message
Mike (bild85) wrote :

upgraded from 12.04 and the main search function is basically unusable due to slowness. Takes 5 seconds to just 'fade in'. Beauty trumps function I suppose :-/

Revision history for this message
Oliver Marks (oly) wrote :

I am seeing this issue as well, all results popup instantly except for local applications i will get results on music and books i can buy and local files but takes a while for my local application to appear.

happens on two laptops one with radeon the other with intel graphics and its a tad frustrating.

Revision history for this message
Lars Ola Liavåg (l-liavag) wrote :

This is still a problem after upgrading two computers to 13.10.

Revision history for this message
Andrei Shevchuk (shevchuk) wrote :

Two-years old most heated bug... probably importance should be at least 'High'.

Revision history for this message
Sergio (sergiorussia) wrote :

Seems like they don't care. So sad Synapse is discontinued…

Revision history for this message
Lars Ola Liavåg (l-liavag) wrote :

Still a problem 14.04. :-(

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

I've rashly remove all the stuff making it slow:

sudo apt-get purge unity-lens-friends unity-scope-audacious unity-scope-chromiumbookmarks unity-scope-clementin unity-scope-colourlovers unity-scope-devhelp unity-scope-fireoxbookmarks unity-scope-gdrive unity-scope-gmusicbrowser unity-scope-gourmet unity-scope-guayadeque unity-scope-manpages unity-scope-musicstores unity-scope-musiqe unity-scope-openclipart unity-scope-texdoc unity-scope-tomboy unity-scope-video-remote unity-scope-virtualbox unity-scope-yelp unity-scope-zoter unity-lens-friend unity-lens-music unity-lens-photos unity-lens-video

Revision history for this message
Luis Alberto Pabón (copong) wrote :

This is still an issue on 14.04. From the moment the desktop appears until the first search result shows up on the dash it's a good minute and a half on a moderately fast laptop (i5-4200M, 8GB RAM, 7200rpm hdd).

Revision history for this message
Jim Raredon (decoy-umd) wrote :

I have the same behavior on 3 different PCs, all i7s. It often takes 40 seconds for results to show up in the dash during the first 5-10 minutes of use.

Revision history for this message
Siegfried Gevatter (rainct) wrote :

I'm pretty sure that's because of reading stuff from the hard drive (and I'd expect it to be more Unity related than Zeitgeist).

Revision history for this message
Scott (scott-l-barlow) wrote :

How is this still not fixed? I'm so sick of this bug, I've had it for years now. I'm at the point where I'll probably switch to Mint or something else.

Revision history for this message
Lars Ola Liavåg (l-liavag) wrote :

Well, I've still got it in 14.10. There's no doubt that this isn't a priority. We can probably only put our hope in Unity 8.

Revision history for this message
JaSauders (jasauders) wrote :

I just experienced some monumental slowness on my work laptop, which is a Latitude E7440 that came with Ubuntu on it from Dell. Intel i5, 8GB RAM, SSD, and still I felt like I was on a Pentium 4 rig. The slowness got worse over time, but I did my best to ignore it. I just didn't understand how my laptop was running so bad when a Pentium Dual Core system I have at home on a spinning hard drive was wildly faster with the same installation of 14.04 with the same flash drive/ISO.

Reading through the above responses some users talked about removing the old zeitgeist database, which would force zeitgeist to rebuild a new one. Someone mentioned that they noticed a speed improvement when removing their ~180 MB instance of zeitgeist. I checked mine... 1.3 GB! Yes, 1.3 GB was tied up with zeitgeist. While I do use my laptop all throughout my work day, every day, it still surprised me as I haven't even had it for a full year yet. This is a bit concerning, as it feels somewhat inevitable that users will face a slow down over time - it just depends on your usability, as you may never see it or it may be far enough into the future where you likely already rebuilt your system on a newer install.

That said, I removed all of the files in there and boom. Much, much better. While my initial database size was in the kilobytes, once I rebooted it came up to about 48 MB. It's sitting now at 50.0 MB and hasn't risen at all (yet) despite me searching for multiple folders, files, and applications in the dash itself. I'm hoping it's quite a long time before I see zeitgeist hitting the gigabyte mark again...

Clearing this out made Unity significantly faster to work with. It, honestly, restored a lot of my joy with using Unity. This process felt similar to nuking the cache in a web browser. Just to fire out some thoughts in case they are of any assistance with generating ideas, perhaps there's a way within the zeitgeist sqlite database to automatically purge older items once the database hits its cap size. Let's say we set the cap at (pulling a random number out here) 100 MB. Once we roll over to 101 MB, the data in the initial 1 MB slice would get purged. Sort of like a logrotate setup. Or, of course, it could auto purge once a week on an anacron basis. That might be acceptable as well. (from an end user point of view, either way would be acceptable, but I'm not sure what technicalities exist that would dictate one choice over the other).

Either way, there's no reason to have end users worrying about purging the database Unity relies on. Without this workaround, users experiencing Unity slowness are simply stuck with a slow Unity interface. This surely is not a preferred experience by any stretch. Unity 7 is not going anywhere as per Canonical's decision to have Unity 7 defaulted on the next few short term releases, including the current already-released 14.04 LTS. As a result, (I cannot emphasize this enough), I hope this isn't a "wait for Unity 8" type of solution.

Revision history for this message
EricDHH (ericdhh) wrote :

15.04 amd64

First search on a quadcore 2.8Ghz machine with 250MB/s ssd drive took around 30 seconds, but only first search.

Revision history for this message
Wilson (wilson-ubuntu) wrote :

Same problem here, at first use I'm used to wait 30 sec before I can open any app, quite embarrassing at work.

I've noticed that users without home encryption have only a negligible delay

Revision history for this message
Aaron Peromsik (aperomsik) wrote :

#26 seems to have made a huge difference for me on 15.10. Perhaps there should be some built-in regular maintenance for that database.

Changed in zeitgeist (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
milestone: none → ubuntu-16.04
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Use upstart for launching zeitgeist in Unity and add a zeitgeist-vacuum that performs vacuum operation on database every few days.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Updated patch with proper patch-headers

Revision history for this message
TomasHnyk (sup) wrote :

BTW: not that I ever properly understood what Zeitgeist was for nor I am sure if it is not more or less abandonded these days, but does not this make it rather useless? Was not it supposed to learn th efrequency of things you use so that they can be then displayed as first results in the Dash? i.e. a smarter "recently used"?

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "zeitgeist_0.9.16-upstart-and-vacuum-support.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Sebastien Bacher (seb128) wrote :

@TomasHnyk, the vacuum cleans up the database, it shouldn't delete records...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zeitgeist - 0.9.16-0ubuntu4

---------------
zeitgeist (0.9.16-0ubuntu4) xenial; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * debian/patches/startup-database-vacuum.patch:
    - Perform VACUUM operation on activity DB on startup (LP: #919801)

  [ Iain Lane ]
  * Re-work the above patch to not rely on an upstart job - we don't have
    upstart support in D-Bus and it relied on a fair bit of gymnastics that
    aren't necessary.

 -- Iain Lane <email address hidden> Wed, 24 Feb 2016 14:14:02 +0000

Changed in zeitgeist (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Mathew Hodson (mhodson) wrote :

Is this bug done? Can I remove the unity-lens task?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Not completely. While this change improve things on zeitgeist side (not fully), the unity lens part has still some room for improvements I think.

Mathew Hodson (mhodson)
Changed in unity-lens-files (Ubuntu):
importance: Undecided → Low
tags: added: xenial
Revision history for this message
Lars Ola Liavåg (l-liavag) wrote :

At last, a new Ubuntu release seems to have made a difference. With Xenial, I'm down to a couple of seconds or less populating the Dash first time on first login. I'm not sure if it's down to the new release since I already had a startup command to preload selected scopes according to Bruno Nova's suggestion under bug #1061852, and I guess the startup job may hve survuved the upgrade:

/usr/bin/unity-scope-loader applications/applications.scope applications/scopes.scope commands.scope

Nonetheless, under 15.10, this didn't work anywhere nearly as well as it does in 16.04, so I guess the underlying problem has benefited from some of the groundwork in the new release. Just out of curiosity, I'll probably deactivate the startup job above to see what difference it makes.

Anyway, having scope access times of less than two seconds on first login has not happened to me since before 12.04, so finally, Unity 7 seems to reach its full potential - just in time for it to be replaced by Unity 8...

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

Duplicates of this bug

Other bug subscribers