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

Improving find file performance by hacking in FindFileInProject. #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Improving find file performance by hacking in FindFileInProject. #21

wants to merge 1 commit into from

Conversation

evanlong
Copy link

@evanlong evanlong commented Jun 3, 2012

The change I made to FindFileInProject: use textmate.el's project root finder.
And picking between the find command and git ls-files if the active file happens
to be under git control.

The speed to first finding a file is significantly faster.

Here are the performance results that influenced my decision to list files under git control using git ls-files but avoid using hg manifest for mercurial (hardly scientific):

With the django project I had the following timing results for listing files:

time find . -path *.hg -prune -o -name *.git -prune -o -print 1>/dev/null
real 0m0.111s
user 0m0.046s
sys 0m0.062s

time git ls-files 1>/dev/null
real 0m0.014s
user 0m0.009s
sys 0m0.004s

time hg manifest 1>/dev/null
real 0m0.406s
user 0m0.146s
sys 0m0.055s

The change I made to FindFileInProject: use textmate.el's project root finder.
And picking between the find command and git ls-files if the active file happens
to be under git control.

The speed to first finding a file is significantly faster.
@evanlong
Copy link
Author

evanlong commented Jun 3, 2012

Should also note I left ⌘+T intact now. You'll need to bind ffip to a key with something like this: (global-set-key (kbd "C-x f") 'ffip).

It makes it easy to compare and contrast the difference between the two for testing now.

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

Successfully merging this pull request may close these issues.

1 participant