Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (back) tracker support. #882

Open
darkshram opened this issue Dec 13, 2017 · 16 comments
Open

Add (back) tracker support. #882

darkshram opened this issue Dec 13, 2017 · 16 comments

Comments

@darkshram
Copy link

Tracker 2.0 deprecated tracker-needle and tracker-preferences. This leaves without a graphical client for it any DE that hasn't integrated Tracker. Caja has code to use tracker for search. It's disabled because teh needed macros are absent in configure.ac, but the rest is there —even with an unconditioned include, but unused.

The current code in master branch it's very outdated and only works with very old versions of tracker. I have updated it to work with tracker 1.x and 2.x (borrowed some code from Nemo and Nautilus). I'm currently doing testing in 5 computers. Seems to works perfect, no crashes, no errors, no warnings. Unlike regular search, tracker searches show almost instant results.

Should I fork an push my patch? Tracker is not part of MATE Desktop but it would be nice to have optional support for it.
caja-1.18.5-tracker-support.patch.zip

pantallazo-2017-12-12 21-44-12-fs8

@flexiondotorg
Copy link
Member

@monsta @raveit65 I think it would be a valuable feature to add to Caja. I'm in favour of seeing a pull request that adds Tracker support. What do you think?

@flexiondotorg
Copy link
Member

This would also address #867

@darkshram
Copy link
Author

darkshram commented Dec 16, 2017

@flexiondotorg, I made pull request #883 (with an extra commit today to really make tracker optional). Nautilus and Nemo have tracker support (by default). I think Caja should do too (optional, so let packagers pick and have @raveit65 happy). Both Nautlius and Nemo enable tracker by default.

As I did mention in the comments of the pull request, #867 would be sort of fixed if a tracker index exists. This means: tracker must be installed and tracker-miners must have been run at least once to create the indexes for search.

By default, the current Fedora packages do OnlyShowIn=GNOME;KDE;XFCE;X-MEEGO-HS;X-MEEGO-NB;X-IVI;Unity; for tracker-miner-apps and the rest only for GNOME (and cinnamon). If #883 is approved, distros should be asked to enable tracker for MATE if they chose build with tracker support.

Search performance with tracker is way better than simple search. Some people like tracker (I do) some people don't, mainly because the miners usually slow down desktop start up if the user has thousands of files. But can be configured through gsettings or tracker-settings to be less anoying by excluding directories or to disable miners.

Same as Nautilus and Nemo, tracker suport for Caja does not install anything extra.

Once distros start shipping Tracker 2.0, performance will be a lot better better and tracker miners will be less annoying.

I put an animated gif at https://github.com/mate-desktop/caja/pull/883#issuecomment-351554711 showing tracker search performance. Unfortunately I made it using spanish as interface language.

Simple search doesn't use an index. Works the same as find tool, using cache memory. The code for simple search is a little obsolete. Still uses eel macros. Needs an update.

I have done another patch based on the code of Nautilus and Nemo (basically the same) to try to at least update simple search and benefit from the users feedback and bugfixes GNOME and Cinnamon do in the future. So far today (I'm already testing), works a little better than the current code (have thousands of files to stress it). Let me do more test during the weekend and will make a pull request if everything goes well.
caja-search-engine-simple-fix.patch.zip

@flexiondotorg
Copy link
Member

Excellent summary. Thank you!

@raveit65
Copy link
Member

I think it would be a valuable feature to add to Caja. I'm in favour of seeing a pull request that adds Tracker support. What do you think?

@flexiondotorg
You only needs to help out with reviewing PRs.........

@lukefromdc
Copy link
Member

With as many files as I have, Tracker would definately create issues on desktop start. I had trouble with it back in the 2009 era and probably that was why. Thus it certainly needs to be optional, and if a user removes it doing so should not remove Caja or cause it to fail to start even if it was originally built with tracker.

@lukefromdc
Copy link
Member

Does tracker offer a way to shut down the indexing function if it has been installed as a dependency by another program? I am concerned about users of older hardware or who have a lot of files finding some distros have startup issues if tracker can't be stopped from running

@darkshram
Copy link
Author

darkshram commented Dec 20, 2017

@lukefromdc Tracker offers that and more trough gsettings and tracker-preferences.

Tracker build is disabled by default on caja default build. Tracker is used only if packager builds with tracker support.

By the way, tracker from 2009 is completly different to tracker in 2017. That's 8 years of development and improvements.

Tracker is disabled at start up in most distros for all DE except GNOME and Cinnamon.

@lukefromdc
Copy link
Member

I figured that, as much as any other software. This is ideal, if a build can support Tracker and Tracker itself need only be present, not running and is user configurable. I'm fine with this.

If distros build with it they will need to turn it on by default or allow users to do so. For it to appear in startup applications in m-c-c is all this really needs.

@darkshram
Copy link
Author

@lukefromdc By default Fedora and other distros uses OnlyShowIn=GNOME. Distros should be asked to consider enable for MATE if this PR is approved and if packagers build with tracker support.

Both Nautilus and Nemo use tracker as default search engine over simple search because the second has a terrible performance (same as Caja #867).

After this PR I'm pulling a simple search enhancement to support wildcards and avoid following symlinks (so it will be consistent with find tool). I have done testing and it has some improvements over performance (not as much as one would like, unfortunatley there is not much that can be done there). A simple search on / directory for 'python' takes 20 seconds less than current code (2:57 vs 2:36) . Will put some images with it once this PR is done.
caja-search-engine-simple-modernize-code.zip

@lukefromdc
Copy link
Member

Good to see upgrades for simple-search, as it has a lot of users, myself included. A 20 second cut is quite significant

@raveit65
Copy link
Member

By default Fedora and other distros uses OnlyShowIn=GNOME.

/etc/xdg/autostart/tracker-extract.desktop
/etc/xdg/autostart/tracker-miner-apps.desktop
/etc/xdg/autostart/tracker-miner-fs.desktop
/etc/xdg/autostart/tracker-miner-rss.desktop
/etc/xdg/autostart/tracker-miner-user-guides.desktop
/etc/xdg/autostart/tracker-store.desktop

Which one needs to be enabled for mate?

-_- ... is there a reason why you hide this important info in PR?

Btw. if you like to have this in distros, ie. fedora, i suggest to do an PR at tracker upstream.

@raveit65
Copy link
Member

Ok, after adding MATE to OnlyShowIn from tracker desktop files searching with tracker works now.
But i run into another problem and iam pretty sure a lot of users will affected too if a distro maintainer switched to tracker.
Tracker indexing only the home folder with first run and ihnore other partitions which are mounted somewhere. In my case ie.
/media/Jackass.
Without adding this dir to tracker config the search is complete broken at this folder and subfolders.

Another bigger problem for me that 'case insensitive' search is ignored , and i didn't found any tracker setting for this.
Sorry, i can't approve it like this.

@raveit65
Copy link
Member

Another problem with using tracker.
I 've symlink my rpmbuild folder in /home with same folder in dropbox to work easily on different boxes/installations.
If i search inside the symlink folder i found nothing. If i do the same search directly under /home/my-account/ i found files which are in the symlink folders.
Sorry, i can't work like this, i need to drop this patch from my local build.

@monsta
Copy link
Contributor

monsta commented Feb 1, 2018

Due to the mentioned issues, I feel it should be left for 1.22. But the simple search optimization is separate from this, and it's a bugfix, so I suggest making a PR for it.

@LinuxBeaver
Copy link

I have tracker running but Caja still has a mediocre file search.

Can someone tell me what I have to do to get tracker working with caja?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants