Skip to content
This repository was 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
ficristo wants to merge 7 commits into
adobe:masterfrom
ficristo:chokidar
Closed

ficristo wants to merge 7 commits into
adobe:masterfrom
ficristo:chokidar

Conversation

@ficristo

@ficristo ficristo commented Feb 3, 2016

Copy link
Copy Markdown
Collaborator

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

@ficristo

ficristo commented Feb 3, 2016

Copy link
Copy Markdown
Collaborator Author

/cc @MiguelCastillo

@MiguelCastillo

Copy link
Copy Markdown
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

ficristo commented Feb 4, 2016

Copy link
Copy Markdown
Collaborator Author

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

@ficristo

ficristo commented Feb 7, 2016

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
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

petetnt commented Feb 13, 2016

Copy link
Copy Markdown
Collaborator

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

Otherwise I had no issues.

@MiguelCastillo

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

zaggino commented Aug 3, 2016

Copy link
Copy Markdown
Contributor

@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

ficristo commented Aug 3, 2016

Copy link
Copy Markdown
Collaborator Author

@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

zaggino commented Aug 3, 2016

Copy link
Copy Markdown
Contributor

Thanks @ficristo, will continue testing this today.

@ficristo

ficristo commented Aug 4, 2016

Copy link
Copy Markdown
Collaborator Author

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