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

Conversation

@dangoor
Copy link
Contributor

@dangoor dangoor commented Dec 8, 2014

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.

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.
@redmunds redmunds self-assigned this Dec 8, 2014
@redmunds
Copy link
Contributor

redmunds commented Dec 9, 2014

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)

@redmunds
Copy link
Contributor

redmunds commented Dec 9, 2014

@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.

@dangoor
Copy link
Contributor Author

dangoor commented Dec 9, 2014

Test fixed. Ready for re-review.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already a Jasmine waits(timeout) function. Does that not work here?

@redmunds
Copy link
Contributor

redmunds commented Dec 9, 2014

Done with review. I don't think we need new function and there's a Travis JSHint error.

@dangoor
Copy link
Contributor Author

dangoor commented Dec 9, 2014

Ugh, my email is coming through delayed by a few hours right now. I didn't realize Jasmine had waits. I've changed to using that. I've also fixed the JSHint error.

@redmunds
Copy link
Contributor

redmunds commented Dec 9, 2014

Merging.

redmunds added a commit that referenced this pull request Dec 9, 2014
Debounce calls to ProjectManager._renderTree.
@redmunds redmunds merged commit fcc5763 into master Dec 9, 2014
@redmunds redmunds deleted the dangoor/9851-debounce-render branch December 9, 2014 21:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants