DFreds / code-peek-atom

Atom package to peek functions in different files
MIT License
22 stars 10 forks source link

Indexing Support #40

Open cronoklee opened 6 years ago

cronoklee commented 6 years ago

This plugin is awesome. However on a large project or when working on a busy drive or a or network folder, it can be extremely slow to find the function, even when it's in the same file as I'm working in. I've had cases of waiting 2-3 minutes at times. code-peek is basically useless in these cases.

I would like to suggest creating an index for each project and searching that rather than the entire codebase. It could be something as simple as a text file containing the name, path & line no of each function. We could then just update the relevant part of the index when each file is saved.

cronoklee commented 6 years ago

As a follow up suggestion, we could store in the index the number of times the user clicks each file in the "matching files" list and then order future results by that count so that after one or two searches of the same function, we will always get the most likely desired script first in the matching files list.

DFreds commented 6 years ago

That sounds awesome! I did test out the plugin on a fairly large application, but nothing with busy drives or network folders. Anyway, if you want to start on something like this, I can help you out and contribute!

cronoklee commented 6 years ago

Okay if I every get around to it I'll report back!