Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[PoC] Use chokidar instead of the fsevents/fsevents_win combo #12190

Closed
wants to merge 7 commits into from

Conversation

ficristo
Copy link
Collaborator

@ficristo ficristo commented Feb 3, 2016

This change still cause significant cpu usage.
Only looked at the Activity Monitor on OSX or the Task Manager on Windows.
See #12187

@ficristo
Copy link
Collaborator Author

ficristo commented Feb 3, 2016

/cc @MiguelCastillo

@MiguelCastillo
Copy link
Contributor

@ficristo Ha! build failed because

data: {"message":"API rate limit exceeded for 52.22.60.255. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}

Maybe trigger the build again and see what happens.

@ficristo
Copy link
Collaborator Author

ficristo commented Feb 4, 2016

I had totally missed the depth parameter. Now it's a bit better.

@ficristo
Copy link
Collaborator Author

ficristo commented Feb 7, 2016

Actually it seems to me that the file watcher is recursive on Windows and OSX.
So I removed the depth parameter and added the ignored one.

@ficristo
Copy link
Collaborator Author

@petetnt Could you try your extension https://github.com/petetnt/corrupt-brackets-history with this PR?
I was able to run it once without errors, but running again it failed.
It's not urgent, but I'm curios if this could at least help.
Be aware that, expecially on startup, this is CPU intensive.

@petetnt
Copy link
Collaborator

petetnt commented Feb 13, 2016

@ficristo Tested it, first corruption occurred on the 116th try 😭

Otherwise I had no issues.

@MiguelCastillo
Copy link
Contributor

@ficristo let me take a step back. File watching is a very critical path piece functionality that we cannot regress on. So, it is important that we understand the impact of this proposed changes.

Do you think you can help us understand:

  1. Differences in behavior between what we have and the new library.
  2. Performance differences.
  3. Platform support.

These three questions are very important before we continue going down this path. Thank you so much for understanding why I am being very cautious about these changes :)

@ficristo
Copy link
Collaborator Author

@MiguelCastillo This was an intersting thing to explore for me. I don't mind if it takes it's time.
The situations for what I've understood is as follows.

Currently:

  • OSX: an old version of fsevents, customized to work for 32 bit OS (recursive)
  • Windows: a custom version of fsevents (recursive)
  • Linux: native node api (non recursive)

With chokidar:

  • OSX: a more up to date version of fsevents, 64 bit OS (recursive)
  • Windows: native node api (recursive)
  • Linux: native node api (recursive)

This probably will require an update to CEF where only OSX 64 bit is supported.
The initial CPU usage is a bit high with chokidar, probably too much. There is some effort upstream to improve it.
That's what I learned so far.

@MiguelCastillo
Copy link
Contributor

@ficristo Thats an awesome set of information. I think it makes sense to gather some metrics to understand how we will be affected. Updating CEF is a PITA. We should explore if we have any plans to update soon.

@ficristo
Copy link
Collaborator Author

I've tried to add the preferences for the paths to ignore but I seems to have encountered some circular reference problems...

@zaggino
Copy link
Contributor

zaggino commented Aug 3, 2016

@ficristo I've build shell using adobe/brackets-shell#543 and used this PR as a base to run tests. I can see some fs watching logged to the console but running the tests fails:

image

@ficristo
Copy link
Collaborator Author

ficristo commented Aug 3, 2016

@zaggino I fixed the tests.
I'm still not familiar enough with the Brackets code for file watching so if you want to make any changes go ahead.

@zaggino
Copy link
Contributor

zaggino commented Aug 3, 2016

Thanks @ficristo, will continue testing this today.

@ficristo
Copy link
Collaborator Author

ficristo commented Aug 4, 2016

Replaced by #12647.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants