Bug 176063 - REGRESSION(r220235): Web Inspector: Global search should not happen incrementally
Summary: REGRESSION(r220235): Web Inspector: Global search should not happen increment...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-29 13:36 PDT by Joseph Pecoraro
Modified: 2017-08-29 18:30 PDT (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (4.05 KB, patch)
2017-08-29 13:47 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-08-29 13:36:17 PDT
REGRESSION(r220235): Web Inspector: Global search should not happen incrementally

Incremental search is bad at the global search level because a slowly typed search string could result in full text search of strings like "a" which result in many, many results and unfortunately slow performance during that process.

Steps to reproduce:
1. Inspect this page
2. Type "a" in the search field
  => Search happens even though I didn't consider my search term complete yet

Regression: (bug 175108)
> -    this._searchToolbarItem = new WI.SearchBar("inspector-search", WI.UIString("Search"), null, true);
> +    this._searchToolbarItem = new WI.SearchBar("inspector-search", WI.UIString("Search"), true);

Notes:
- It does seem we can remove the unused delegate of WI.SearchBar.
Comment 1 Joseph Pecoraro 2017-08-29 13:47:29 PDT
Created attachment 319279 [details]
[PATCH] Proposed Fix
Comment 2 Devin Rousso 2017-08-29 17:08:37 PDT
Comment on attachment 319279 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=319279&action=review

r=me

> Source/WebInspectorUI/UserInterface/Base/Main.js:401
> +    const incremental = false;
> +    this._searchToolbarItem = new WI.SearchBar("inspector-search", WI.UIString("Search"), incremental);

NIT: since this is false, I don't think you need to include it at all.
Comment 3 Joseph Pecoraro 2017-08-29 18:18:42 PDT
Comment on attachment 319279 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=319279&action=review

>> Source/WebInspectorUI/UserInterface/Base/Main.js:401
>> +    this._searchToolbarItem = new WI.SearchBar("inspector-search", WI.UIString("Search"), incremental);
> 
> NIT: since this is false, I don't think you need to include it at all.

Correct. That said, I like being explicit here, so I'll leave it as is. If we ever add new options we could make this an options dictionary {optional: true}, etc.
Comment 4 WebKit Commit Bot 2017-08-29 18:29:29 PDT
Comment on attachment 319279 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 319279

Committed r221332: <http://trac.webkit.org/changeset/221332>
Comment 5 WebKit Commit Bot 2017-08-29 18:29:30 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-08-29 18:30:37 PDT
<rdar://problem/34149530>