Add option to use locate?
cljoly opened this issue · 10 comments
The locate
command is indexed and could be faster than fd on some machines.
Put a 👍🏼 if you are interested in this feature!
This could be implemented as another command, for instance repo cached_list
I think that this would be an absolutely awesome feature. The ideal case would be that telescope-repo creates this cache
in the background on vim startup and then you can update this cache if you know you have new stuff on your machine..
Because for me, at least on my old intel mac, running the search takes quite a while. Totally worth it thooooo, but having a cache would be amazing!!
or maybe this cache could be updated on a scheduled basis like once every hour or so?
I haven't learnt about scheduling jobs myself yet but I imagine that it would work.
The locate
command is associated with a system wide database updated through updatedb
, whose man page reads:
updatedb is usually run daily by cron(8) to update the default database
So, especially in the beginning, I don’t think much integration of the database update with the plugin is needed.
Because for me, at least on my old intel mac, running the search takes quite a while.
I agree this type of command needs to be fast. It takes less than a second on my machine and that’s almost too much already.
We may need a bit of refactoring to keep things maintainable even with the locate
and fd
commands side by side.
The
locate
command is associated with a system wide database updated throughupdatedb
, whose man page reads:updatedb is usually run daily by cron(8) to update the default database
So, especially in the beginning, I don’t think much integration of the database update with the plugin is needed.
Because for me, at least on my old intel mac, running the search takes quite a while.
I agree this type of command needs to be fast. It takes less than a second on my machine and that’s almost too much already.
this is perfect!!
Working on this, I start to have a solution…
@molleweide would you be willing to test on your Mac please? (I don’t have one…)
yeah sure, when I come home later today.
#9 should be ready for your testing when you have time @molleweide . Feel free to put comments there.