This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
switch project performance improvements #1197
Merged
Merged
Conversation
This file contains 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
ghost
assigned gruehle
Jul 9, 2012
|
||
$(DocumentManager).on("beforeDocumentDelete", function (event, doc) { | ||
// Only documents in the current project are tracked | ||
if (ProjectManager.isWithinProject(doc.file.fullPath)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for a document to remain loaded, even after its project has been closed? If so, this check will fail and the listener won't be removed. It should be safe to just unconditionally remove the listener.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of how that could happen, but I made the change to be safe.
I also fixed a few other JSLint warnings in this file.
Initial review complete. |
Finished with updates for initial code review. |
Looks good, and definitely speeds up project loading! Merging. |
gruehle
added a commit
that referenced
this pull request
Jul 10, 2012
switch project performance improvements
This was referenced Aug 26, 2012
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.
Changes: