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

Ungit fails on repositories with many files #90

Closed
grundprinzip opened this issue Aug 21, 2013 · 10 comments
Closed

Ungit fails on repositories with many files #90

grundprinzip opened this issue Aug 21, 2013 · 10 comments

Comments

@grundprinzip
Copy link

Unfortunately ungit fails on larger repositories (at least on my Mac). The reported error is:

(CarbonCore.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)

And after some googling this leads to this issue in Node.js - nodejs/node-v0.x-archive#5463

As a consequence using ungit on some of my repositories is just impossible :(

@hakubo
Copy link

hakubo commented Aug 21, 2013

+1 one for that
i was able to se some graph then it dies :(

@hoguej
Copy link

hoguej commented Aug 21, 2013

My repo is relatively small, but has lots of fork and merges, and it is unusable for me as well.

@adambiggs
Copy link

Looks like a fix is in the works joyent/libuv#894

@indutny
Copy link

indutny commented Aug 22, 2013

Despite that we're definitely going to fix it, please consider watching less directories if possible. This error happens when trying to watch a lot of directories using fs.watch, and workaround that I've developed is O(n^2) .

@FredrikNoren
Copy link
Owner

Hm I could make a "manual refresh" mode I guess (where you'd have to press a button to get the changes into the staging area). Not super beautiful but maybe it could be a good enough compromise to make it usable for those repositories too?

@FredrikNoren
Copy link
Owner

(Changed the header to better reflect the issue)

@adambiggs
Copy link

This might be a dumb idea, but instead of watching files could you simply poll git status every 1-2 seconds? Maybe use polling as a fallback once the file count goes over a certain threshold.

@indutny
Copy link

indutny commented Aug 22, 2013

Wait a minute, watching files is ok. Just avoid watching a lot of directories at once, usually its not even necessary, because fs.watch() on osx will emit events from subdirectories too!

FredrikNoren added a commit that referenced this issue Sep 9, 2013
Replaced the watchr module with a normal fs.watch. However, fs.watch isn't prefect on all platforms (on Windows changes in subdirectories doesn't get picked up) so there's also an "re-activity" hack to detect when a user is interested in ungit (which triggers a refresh)
@FredrikNoren
Copy link
Owner

I've made a fix (ref above) that I hope will fix this, together with @indutny 's fs.watcher fix. Anyone who's experience problem with this please try ungit master (or wait for the next release) and node >= 0.10.17 to see if it works now.

@FredrikNoren
Copy link
Owner

Closing this now, please re-open if the problem remains after 0.2.0

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

No branches or pull requests

6 participants