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 option to use locate? #3

Closed
cljoly opened this issue Jul 27, 2021 · 10 comments
Closed

Add option to use locate? #3

cljoly opened this issue Jul 27, 2021 · 10 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@cljoly
Copy link
Owner

cljoly commented Jul 27, 2021

The locate command is indexed and could be faster than fd on some machines.

Put a 👍🏼 if you are interested in this feature!

@cljoly cljoly added good first issue Good for newcomers question Further information is requested labels Oct 3, 2021
@cljoly
Copy link
Owner Author

cljoly commented Oct 31, 2021

This could be implemented as another command, for instance repo cached_list

@molleweide
Copy link
Contributor

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!!

@molleweide
Copy link
Contributor

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.

@cljoly
Copy link
Owner Author

cljoly commented Nov 1, 2021

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.

@cljoly
Copy link
Owner Author

cljoly commented Nov 1, 2021

We may need a bit of refactoring to keep things maintainable even with the locate and fd commands side by side.

@cljoly cljoly added help wanted Extra attention is needed and removed question Further information is requested labels Nov 1, 2021
@molleweide
Copy link
Contributor

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.

this is perfect!!

@cljoly
Copy link
Owner Author

cljoly commented Nov 2, 2021

Working on this, I start to have a solution…

@cljoly
Copy link
Owner Author

cljoly commented Nov 2, 2021

@molleweide would you be willing to test on your Mac please? (I don’t have one…)

@molleweide
Copy link
Contributor

yeah sure, when I come home later today.

cljoly added a commit that referenced this issue Nov 2, 2021
Use a `locate` command instead of `fd`, to get cached results. Update
the documentation as well.

Fixes #3
@cljoly
Copy link
Owner Author

cljoly commented Nov 2, 2021

#9 should be ready for your testing when you have time @molleweide . Feel free to put comments there.

cljoly added a commit that referenced this issue Nov 2, 2021
Use a `locate` command instead of `fd`, to get cached results. Update
the documentation as well.

Fixes #3
cljoly added a commit that referenced this issue Nov 2, 2021
Use a `locate` command instead of `fd`, to get cached results. Update
the documentation as well.

Fixes #3
cljoly added a commit that referenced this issue Dec 11, 2021
Use a `locate` command instead of `fd`, to get cached results. Update
the documentation as well.

Fixes #3
@cljoly cljoly closed this as completed in 6a81dc8 Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants