-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] [File watchers] Speed up project switching - don't wait for unwatch #5975
Comments
Comment by jasonsanjose Will PR #6565 since we will unwatch the whole project in one batch request instead of visiting the full file tree, then firing individual commands to the |
Comment by peterflynn
|
Comment by njx Reviewed. Since we're planning to change Windows so that we're only watching/unwatching the root folder, it seems like this will be a lot less of an issue, so marking low pri for now. If it turns out that it's still slow after that, we can bump up the priority. |
Comment by njx To |
Comment by peterflynn
|
Comment by bchintx
Actually, the unwatch wasn't noticeably slower in the old implementation, but the watching of new, expanded subfolders in the switched-to project was noticeably faster in the new implementation. Seems like we got the most performance boost from not having to watch every subfolder. Yay! I'll re-assign this bug to myself and mark it FBNC once the new implementation is merged as Pull Requests #6673 and #412. |
Comment by peterflynn Schweet |
Comment by bchintx PRs have been merged to |
Comment by peterflynn Removing FBNC since the outcome was we actually decided this change was unneeded. Closing. |
Issue by peterflynn
Friday Jan 17, 2014 at 23:22 GMT
Originally opened as adobe/brackets#6573
PR #6548 fixed bug #6540, but it makes project switching slower as a result because we wait for all the previous project's file watchers to be turned off before we begin loading the new project. (And while we're waiting, which can be ~1 sec on Windows, the UI is in a somewhat weird intermediate state -- all your editors have closed and the working set is empty, but the file tree is still showing the old project).
Really, to avoid #6540 we just need to wait until after the FileIndex has been cleared. We don't think there's any reason that
FileSystem.unwatch()
can't clear the FileIndex immediately, before the unwatch is complete. If another watcher change arrives in between those two events, the code inFileSystem._handleExternalChange()
will essentially no-op becausethis._index.getEntry()
will yield undefined.We didn't use that fix right off the bat because we wanted to have a little more testing runway just to verify that everything works... but we should switch to that fix eventually.
The text was updated successfully, but these errors were encountered: