{"action":"created","comment":{"url":"https://api.github.com/repos/adobe/brackets/pulls/comments/34377867","id":34377867,"diff_hunk":"@@ -417,15 +418,26 @@ define(function (require, exports, module) {\n         }\n         \n         var scopeName = searchModel.scope ? searchModel.scope.fullPath : ProjectManager.getProjectRoot().fullPath,\n-            perfTimer = PerfUtils.markStart(\"FindIn: \" + scopeName + \" - \" + queryInfo.query);\n+            perfTimer = PerfUtils.markStart(\"FindIn: \" + scopeName + \" - \" + queryInfo.query),\n+            searchDeferred = new $.Deferred();\n         \n-        return candidateFilesPromise\n+        candidateFilesPromise\n             .then(function (fileListResult) {\n                 // Filter out files/folders that match user's current exclusion filter\n                 fileListResult = FileFilters.filterFileList(filter, fileListResult);\n+                fileListResult = FindUtils.getSortedFiles(fileListResult, function (file) { return file.fullPath; }, FindUtils.getOpenFilePath());","path":"src/search/FindInFiles.js","position":33,"original_position":33,"commit_id":"d5cf805a0a346da60cf17ebc0a47e58b6df08e8f","original_commit_id":"873a1eb1e090dea8646954373720c1a04ec01d1d","user":{"login":"TomMalbran","id":1299997,"avatar_url":"https://avatars.githubusercontent.com/u/1299997?v=3","gravatar_id":"","url":"https://api.github.com/users/TomMalbran","html_url":"https://github.com/TomMalbran","followers_url":"https://api.github.com/users/TomMalbran/followers","following_url":"https://api.github.com/users/TomMalbran/following{/other_user}","gists_url":"https://api.github.com/users/TomMalbran/gists{/gist_id}","starred_url":"https://api.github.com/users/TomMalbran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomMalbran/subscriptions","organizations_url":"https://api.github.com/users/TomMalbran/orgs","repos_url":"https://api.github.com/users/TomMalbran/repos","events_url":"https://api.github.com/users/TomMalbran/events{/privacy}","received_events_url":"https://api.github.com/users/TomMalbran/received_events","type":"User","site_admin":false},"body":"I think that we could also go back to the original implementation where we didn't sort the files upfront and updated the UI on every progress. When I did the change we were updating it after every file searched, but since now we are doing it after 50 files it might not be as slow as before, even if updating the DOM is slow.","created_at":"2015-07-10T17:45:45Z","updated_at":"2015-07-10T17:45:45Z","html_url":"https://github.com/adobe/brackets/pull/11128#discussion_r34377867","pull_request_url":"https://api.github.com/repos/adobe/brackets/pulls/11128","_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/34377867"},"html":{"href":"https://github.com/adobe/brackets/pull/11128#discussion_r34377867"},"pull_request":{"href":"https://api.github.com/repos/adobe/brackets/pulls/11128"}}},"pull_request":{"url":"https://api.github.com/repos/adobe/brackets/pulls/11128","id":35573299,"html_url":"https://github.com/adobe/brackets/pull/11128","diff_url":"https://github.com/adobe/brackets/pull/11128.diff","patch_url":"https://github.com/adobe/brackets/pull/11128.patch","issue_url":"https://api.github.com/repos/adobe/brackets/issues/11128","number":11128,"state":"open","locked":false,"title":"[Review Only] Find in Files incremental update","user":{"login":"redmunds","id":1197144,"avatar_url":"https://avatars.githubusercontent.com/u/1197144?v=3","gravatar_id":"","url":"https://api.github.com/users/redmunds","html_url":"https://github.com/redmunds","followers_url":"https://api.github.com/users/redmunds/followers","following_url":"https://api.github.com/users/redmunds/following{/other_user}","gists_url":"https://api.github.com/users/redmunds/gists{/gist_id}","starred_url":"https://api.github.com/users/redmunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redmunds/subscriptions","organizations_url":"https://api.github.com/users/redmunds/orgs","repos_url":"https://api.github.com/users/redmunds/repos","events_url":"https://api.github.com/users/redmunds/events{/privacy}","received_events_url":"https://api.github.com/users/redmunds/received_events","type":"User","site_admin":false},"body":"This is a branch I started during \"Innovation Days\" in November, 2014.\r\n\r\nStarting this pull request to use for discussion while this is being reviewed/developed.\r\n\r\nDONE:\r\n* update FiF panel incrementally\r\n* update spinner during search\r\n* search (sequentially) groups of files (in parallel) for balance of speed and responsiveness\r\n\r\nTODO:\r\n* add Cancel button to FiF panel\r\n* Closing FiF panel should stop the search\r\n* Unit tests for `Async.doInSequentialBatches()`\r\n\r\nNote:\r\n* Search speed refers to *first* search. Subsequent searches are fast because all files are loaded to memory\r\n\r\nTesting\r\n* unit tests\r\n* Hit count is updated while search is in progress\r\n* Next Page and Last Page buttons should work while search is in progress\r\n* Spinner animation works while search is in progress\r\n* Search can be cancelled\r\n* Cancel button removed after search completes\r\n","created_at":"2015-05-16T16:12:23Z","updated_at":"2015-07-10T17:45:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6591a969d6e7ffc3e22e4ca6e641dc4aea872dc","assignee":null,"milestone":{"url":"https://api.github.com/repos/adobe/brackets/milestones/36","html_url":"https://github.com/adobe/brackets/milestones/Release%201.4","labels_url":"https://api.github.com/repos/adobe/brackets/milestones/36/labels","id":1048084,"number":36,"title":"Release 1.4","description":"","creator":{"login":"ryanstewart","id":45450,"avatar_url":"https://avatars.githubusercontent.com/u/45450?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanstewart","html_url":"https://github.com/ryanstewart","followers_url":"https://api.github.com/users/ryanstewart/followers","following_url":"https://api.github.com/users/ryanstewart/following{/other_user}","gists_url":"https://api.github.com/users/ryanstewart/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanstewart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanstewart/subscriptions","organizations_url":"https://api.github.com/users/ryanstewart/orgs","repos_url":"https://api.github.com/users/ryanstewart/repos","events_url":"https://api.github.com/users/ryanstewart/events{/privacy}","received_events_url":"https://api.github.com/users/ryanstewart/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":26,"state":"open","created_at":"2015-04-01T04:03:49Z","updated_at":"2015-07-10T01:49:17Z","due_on":"2015-07-07T18:30:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/adobe/brackets/pulls/11128/commits","review_comments_url":"https://api.github.com/repos/adobe/brackets/pulls/11128/comments","review_comment_url":"https://api.github.com/repos/adobe/brackets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adobe/brackets/issues/11128/comments","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/d5cf805a0a346da60cf17ebc0a47e58b6df08e8f","head":{"label":"adobe:randy/fif-incr-update","ref":"randy/fif-incr-update","sha":"d5cf805a0a346da60cf17ebc0a47e58b6df08e8f","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","created_at":"2011-12-07T21:14:40Z","updated_at":"2015-07-10T16:00:11Z","pushed_at":"2015-07-10T17:06:41Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":325968,"stargazers_count":22741,"watchers_count":22741,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4730,"mirror_url":null,"open_issues_count":1379,"forks":4730,"open_issues":1379,"watchers":22741,"default_branch":"master"}},"base":{"label":"adobe:master","ref":"master","sha":"48725b3b03021a77c1eb9bd917579d5090b21607","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","created_at":"2011-12-07T21:14:40Z","updated_at":"2015-07-10T16:00:11Z","pushed_at":"2015-07-10T17:06:41Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":325968,"stargazers_count":22741,"watchers_count":22741,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4730,"mirror_url":null,"open_issues_count":1379,"forks":4730,"open_issues":1379,"watchers":22741,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/11128"},"html":{"href":"https://github.com/adobe/brackets/pull/11128"},"issue":{"href":"https://api.github.com/repos/adobe/brackets/issues/11128"},"comments":{"href":"https://api.github.com/repos/adobe/brackets/issues/11128/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe/brackets/pulls/11128/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adobe/brackets/pulls/11128/commits"},"statuses":{"href":"https://api.github.com/repos/adobe/brackets/statuses/d5cf805a0a346da60cf17ebc0a47e58b6df08e8f"}}}}