-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
[locate] database update #1451
Comments
We should probably rather remove the update action. Locate comes in several flavors (at least bsd and Gnu) and therefore is hard to make to work on all platforms. That's also why I added the param forwarding. For macos spotlights search could also be an alternative. |
the original one does not scan your ~/Library because its running as 'nobody' if you run it with sudo (therefore you have to cd / first). It's for safety purpose, so that 'nobody' can't see the user folder specific contents. Anyway you did a good job with the Albert integration already which is quite smooth and fast since it also stands upon a own indexing database as far as I can see. |
It's an in memory trie. But the performance is not as expected because building (joining) the paths for scoring is expensive. It roughly translates to one microsecond per path. So queries with around 50k items introduce a noticeable delay. It's also not as memory efficient as a sql database. That's all just for performance of having the files (you really need) at hand. However user obv want to index millions of files and complain about speed and memory. |
That's why I wanted to give locate a try. As a user:
With sudo:
Did finally the job, as expected, but wasn't scanning the User Folder, since it's 'nobody', as defined in "/usr/libexec/locate.updatedb" and is not the user since its executed from within root / folder So I tried to route it like the man-page suggests:
And since I expected the last line could work (at least it didn't throw an error) it was not indexing anything. regarding
Therefore I got coreutils and fnutils via homebrew and did it with 'gupdatedb' and 'glocate' (gnu) instead, which you could even alias to the locate command. But you then also have to add: I even tried to replace the /var/db/locate.database with my user_glocate.db but its a different format ;/ |
Package source
Github
App logs
Current Behavior
it's not updating the locate database
Expected Behavior
should update the locate database
Anything else?
change
lambda: runTerminal("sudo updatedb")
into
lambda: runTerminal("/usr/libexec/locate.updatedb")
workaround:
sudo ln -s /usr/libexec/locate.updatedb /usr/local/bin/updatedb
The text was updated successfully, but these errors were encountered: