Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js

Issue 2703433002: DevTools: Do not do deep search in case of bottom-up profile tree. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
index 2e41c672769f0d44d792e57df248cf8036d1ef0e..50b719fd63c50bdf34562489ca0162caec790dd5 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
@@ -383,25 +383,10 @@ Timeline.TimelineTreeView = class extends UI.VBox {
this._currentResult = 0;
if (!this._root)
return;
- this.populateSearchResults(createPlainTextSearchRegex(searchConfig.query, 'i'));
- }
-
- /**
- * @protected
- * @param {!RegExp} searchRegex
- */
- populateSearchResults(searchRegex) {
- var searchResults = [];
- searchTree(this._root);
- this._searchableView.updateSearchMatchesCount(searchResults.length);
- this._searchResults = searchResults;
-
- function searchTree(node) {
- if (node.event && Timeline.TimelineUIUtils.testContentMatching(node.event, searchRegex))
- searchResults.push(node);
- for (var child of node.children().values())
- searchTree(child);
- }
+ var searchRegex = createPlainTextSearchRegex(searchConfig.query, 'i');
+ this._searchResults =
+ this._root.searchTree(event => Timeline.TimelineUIUtils.testContentMatching(event, searchRegex));
+ this._searchableView.updateSearchMatchesCount(this._searchResults.length);
}
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698