-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
…consistent hashes
…d a reminder to refresh watched paths upon domain reload
…he FileSystem level
…project is not currently watched
…reasons) speculatively
…events are fired immediately
…chers are online for more consistent filtering
…oots AND if they pass the watchedRoot's filter function
The recent watching and caching changes seem to have improved Windows startup performance, so I'm checking that task off. |
…existing, unread files is fine.
@iwehrman - yep, performance on Windows is much better with the latest changes. 👍 |
I'm getting different set of unit test failures on Mac. 5 JSQuitEdit and 4 Live Development tests fail. Below is the first error JSQuitEdit failures. should open a function with form: function functionName() |
…/brackets into jasonsanjose/file-watchers
maintain selection in refreshFileTree
…tManager synchronization
Share temp project for ProjectManager-test. Code cleanup.
…onal synchronization
…s when no added or removed files are present.
Fix selection update after fs change event
…of the project root, but when we do refresh the file tree, also clear the change queue (using a new PromiseQueue.removeAll method) and use a debounced refreshFileTree call
… watcher notifications and increase timeouts
Reviewed and confirmed unit tests failures resolved. |
[REVIEW ONLY] File watchers and caching
This review-only PR supersedes #6052. Description still to be written; the text of #6052 is copied below for now.
CC @gruehle @peterflynn @jasonsanjose
This is the first of what will become a two-part pull request. The first part adds file caching with consistency checks using the existing coarse cache-invalidation strategy (i.e., invalidate everything on focus). The second part will use file watchers to implement a more fine-grained cache-invalidation strategy.
Notes:
FileSystemEntry
objects. In particular, stats are cached forFileSystemEntry
objects, and additionally directory contents and children stat lists forDirectory
objects; and file contents forFile
objects._setWatched
on each entry so that it knows to begin caching its data.stat
andread
will immediately return cached data if available. This makes cached reads very fast. (On my machine, searches for occurrences of a single character in the entire Brackets project complete in under a second after data is cached.) Consistency is checked using a hash of the file's contents, which is provided by the impl. The only time the consistency hash is updated is when the contents of the are known: i.e., after reads and writes.FileSystemError.CONTENTS_MODIFIED
. (This error should never occur if the file is created by the write.) If a write is attempted to an existing file that has never been read (i.e., a blind write), the consistency check will fail because there is no hash in memory. This is a case in which the consistency check may be too strict, and so it is possible for clients to override the check by settingblind: true
in the options parameter to the write call. There were no instances of blind writes in Brackets that required this override.TODO 1/2/2014