This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Debounce calls to ProjectManager._renderTree.#10120
Merged
Conversation
This is a possible fix for #9851. In my tests, this can cause a dramatic speed up when lots of filesystem changes cause the tree to be continuously rerendered. I chose 100ms as the debounce time because that seemed quick enough that users will not be waiting for their actions to be reflected in the tree.
Contributor
|
The following WorkingSetView Integration test is failing: "should show the file in project tree when a file is being renamed" Error: Expected undefined to be 'file_two.js'.
at new jasmine.ExpectationResult (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:114:32)
at null.toBe (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:1235:29)
at null.<anonymous> (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/spec/WorkingSetView-test.js:268:70)
at jasmine.Block.execute (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:1064:17)
at jasmine.Queue.next_ (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:2096:31)
at jasmine.Queue.start (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:2049:8)
at jasmine.Spec.execute (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:2376:14)
at jasmine.Queue.next_ (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:2096:31)
at onComplete (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:2092:18)
at jasmine.Spec.finish (file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/test/thirdparty/jasmine-core/jasmine.js:2350:5) |
Contributor
|
@dangoor Done with review. I verified Brackets is now much more responsive with massive changes to file tree (which I tested using git). Just need to fix 1 unit test. |
Contributor
Author
|
Test fixed. Ready for re-review. |
Contributor
There was a problem hiding this comment.
There's already a Jasmine waits(timeout) function. Does that not work here?
Contributor
|
Done with review. I don't think we need new function and there's a Travis JSHint error. |
Also fixes JSHint error.
Contributor
Author
|
Ugh, my email is coming through delayed by a few hours right now. I didn't realize Jasmine had |
Contributor
|
Merging. |
redmunds
added a commit
that referenced
this pull request
Dec 9, 2014
Debounce calls to ProjectManager._renderTree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a possible fix for #9851. In my tests, this can cause a
dramatic speed up when lots of filesystem changes cause the tree
to be continuously rerendered.
I chose 100ms as the debounce time because that seemed quick enough that
users will not be waiting for their actions to be reflected in the tree.