[MD Extensions] [error console] Performance improvement for large source files |
||
Issue descriptionWhen the source file is large (e.g. 5k+ LOC), the code section takes a while (2+ seconds) to be painted. We should be able to find ways to prevent full repaint when: 1) going from the list page to the same error console repeatedly. The code pad shows the same code as last time, so there shouldn't need a repaint. 2) clicking between errors from the same source file. Again, the code hasn't changed, just the highlighting, so we shouldn't need to rerender all the lines. In scenarios where painting the whole large file is unavoidable (e.g. first time its shown), rendering should be async and yield to navigation, and also not freeze the browser if possible.
,
Dec 12 2017
> In scenarios where painting the whole large file is unavoidable (e.g. first time its shown), rendering should be async and yield to navigation, and also not freeze the browser if possible. SGTM. A spinner here would probably be perfectly sufficient.
,
Dec 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/62d0093b891fa483449513db827aee7b36760e0c commit 62d0093b891fa483449513db827aee7b36760e0c Author: Scott Chen <scottchen@chromium.org> Date: Thu Dec 14 01:35:31 2017 MD Extensions: eliminate lags when clicking between errors in the error console. Originally, everytime you select a different error in the error console, the code-section rerenders the text content entirely. This causes extreme lag (2s+ for 10k line of code) everytime you click an error. This CL changes the way code-highlighting is done by using the native text selection API. This allows us to prevent rerenders when inspecting errors from the same file. The side effect of this change is that the highlight now does not persist. If the user clicks somewhere else on the page or ctrl+f for something, then the highlight will be removed. But the original goal to catch the user's attention is still retained. Bug: 793394 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I8effb44d62f9c2897767a3c9f9ae92e86400afc9 Reviewed-on: https://chromium-review.googlesource.com/821511 Commit-Queue: Scott Chen <scottchen@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#523973} [modify] https://crrev.com/62d0093b891fa483449513db827aee7b36760e0c/chrome/browser/resources/md_extensions/code_section.html [modify] https://crrev.com/62d0093b891fa483449513db827aee7b36760e0c/chrome/browser/resources/md_extensions/code_section.js [modify] https://crrev.com/62d0093b891fa483449513db827aee7b36760e0c/chrome/test/data/webui/extensions/extension_code_section_test.js [modify] https://crrev.com/62d0093b891fa483449513db827aee7b36760e0c/chrome/test/data/webui/extensions/extension_load_error_test.js
,
Dec 28 2017
Issue 794850 has been merged into this issue.
,
Dec 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b4828f21ecf0b66c9757bb05e6da6c905759595e commit b4828f21ecf0b66c9757bb05e6da6c905759595e Author: Scott Chen <scottchen@chromium.org> Date: Fri Dec 29 01:38:17 2017 MD Extensions: show only snippets if source is too long. This CL caps the number of lines that the error console's code-pad will show to 1000 LOC around the highlighted code. This will drastically reduce the browser's freezing time caused by rendering large source files. Bug: 793394 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: Ie77b18d92fff93fa2f09ff53131a0967a9fff423 Reviewed-on: https://chromium-review.googlesource.com/826258 Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Reviewed-by: Dave Schuyler <dschuyler@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Commit-Queue: Scott Chen <scottchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#526349} [modify] https://crrev.com/b4828f21ecf0b66c9757bb05e6da6c905759595e/chrome/app/md_extensions_strings.grdp [modify] https://crrev.com/b4828f21ecf0b66c9757bb05e6da6c905759595e/chrome/browser/resources/md_extensions/code_section.html [modify] https://crrev.com/b4828f21ecf0b66c9757bb05e6da6c905759595e/chrome/browser/resources/md_extensions/code_section.js [modify] https://crrev.com/b4828f21ecf0b66c9757bb05e6da6c905759595e/chrome/browser/resources/md_extensions/compiled_resources2.gyp [modify] https://crrev.com/b4828f21ecf0b66c9757bb05e6da6c905759595e/chrome/browser/ui/webui/extensions/extensions_ui.cc [modify] https://crrev.com/b4828f21ecf0b66c9757bb05e6da6c905759595e/chrome/test/data/webui/extensions/cr_extensions_browsertest.js [modify] https://crrev.com/b4828f21ecf0b66c9757bb05e6da6c905759595e/chrome/test/data/webui/extensions/extension_code_section_test.js
,
Jan 2 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by scottchen@chromium.org
, Dec 12 2017Status: Started (was: Available)