DevTools sources editor is slow in multiple aspects: - it's slow to open - it's slow to search We should spend some time and at least collect the low-hanging fruits.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/89a6c654ed501561d3646534dc6277e8b982d2cb commit 89a6c654ed501561d3646534dc6277e8b982d2cb Author: einbinder <einbinder@chromium.org> Date: Fri Nov 11 09:33:26 2016 DevTools: [Sources] Speed up editor tab opening This consolidates the resize event into a single CM operation. BUG= 664324 Review-Url: https://codereview.chromium.org/2490273003 Cr-Commit-Position: refs/heads/master@{#431532} [modify] https://crrev.com/89a6c654ed501561d3646534dc6277e8b982d2cb/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/90c635fa8c796d777dd03e173e0ceca3940f587f commit 90c635fa8c796d777dd03e173e0ceca3940f587f Author: einbinder <einbinder@chromium.org> Date: Fri Nov 11 16:30:11 2016 DevTools: [Sources] Make typing faster when search is open The old code was attempting to cache the mode via comparing regexes with ===. However, regexes are objects and thus could not be compared like this. This patch compares regexes properly. BUG= 664324 Review-Url: https://codereview.chromium.org/2495723002 Cr-Commit-Position: refs/heads/master@{#431573} [modify] https://crrev.com/90c635fa8c796d777dd03e173e0ceca3940f587f/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1f11bb313b15f3805841fa940a9543232417fa78 commit 1f11bb313b15f3805841fa940a9543232417fa78 Author: einbinder <einbinder@chromium.org> Date: Thu Nov 17 04:44:50 2016 DevTools: [Sources] Improve editor load time by optimizing setMimeType Now setMimeType is called only once per mimeType. It runs synchronously if it can to avoid re-highlighting the document. BUG= 664324 Review-Url: https://codereview.chromium.org/2498783002 Cr-Commit-Position: refs/heads/master@{#432744} [modify] https://crrev.com/1f11bb313b15f3805841fa940a9543232417fa78/third_party/WebKit/LayoutTests/inspector/editor/php-highlighter.html [modify] https://crrev.com/1f11bb313b15f3805841fa940a9543232417fa78/third_party/WebKit/LayoutTests/inspector/editor/text-editor-token-at-position.html [modify] https://crrev.com/1f11bb313b15f3805841fa940a9543232417fa78/third_party/WebKit/Source/devtools/front_end/externs.js [modify] https://crrev.com/1f11bb313b15f3805841fa940a9543232417fa78/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js [modify] https://crrev.com/1f11bb313b15f3805841fa940a9543232417fa78/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
That's all what was planned for this.
Comment 1 by bugdroid1@chromium.org
, Nov 11 2016