DevTools: console.assert is slow |
||
Issue description
Today, we employ the following hack for console.assert in utilities.js:
// FIXME: This performance optimization should be moved to blink so that all developers could enjoy it.
// console is retrieved with V8Window.getAttribute method which is slow. Here we copy it to a js variable for faster access.
console = console;
console.__originalAssert = console.assert;
console.assert = function(value, message) {
if (value)
return;
console.__originalAssert(value, message);
};
It looks like it should be easy to finally address this FIXME. What do you think?
,
Nov 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7f48b5bcde47df6852eb72e5f4be3a21f149e0d0 commit 7f48b5bcde47df6852eb72e5f4be3a21f149e0d0 Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Thu Nov 17 18:38:02 2016 [DevTools] contextCreated should be called when context initialization is done Inspector can evaluate and run debugger internal scripts in contextCreated method. BUG= chromium:663845 R=dgozman@chromium.org Review-Url: https://codereview.chromium.org/2498213002 Cr-Commit-Position: refs/heads/master@{#432923} [modify] https://crrev.com/7f48b5bcde47df6852eb72e5f4be3a21f149e0d0/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
,
Nov 22 2016
With CL: https://codereview.chromium.org/2505493002/ from jsperf: builtin console implementation is faster then custom one and even faster then "if (false) console.error(..)":)
,
Nov 22 2016
Attached jsperf without patch. New implementation is around twice faster for console.assert(true) and ~20% faster for console.assert(false).
,
Nov 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/f658e41d864267fb9e99ea76faa7758b0b63d5c9 commit f658e41d864267fb9e99ea76faa7758b0b63d5c9 Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Wed Nov 23 14:20:03 2016 [inspector] make console.assert much faster New console.assert implementation is faster then custom user implementation. BUG= chromium:663845 R=dgozman@chromium.org Review-Url: https://codereview.chromium.org/2505493002 Cr-Commit-Position: refs/heads/master@{#41227} [modify] https://crrev.com/f658e41d864267fb9e99ea76faa7758b0b63d5c9/src/inspector/v8-console.cc [modify] https://crrev.com/f658e41d864267fb9e99ea76faa7758b0b63d5c9/test/debugger/debug/debug-script.js [add] https://crrev.com/f658e41d864267fb9e99ea76faa7758b0b63d5c9/test/inspector/runtime/console-assert-expected.txt [add] https://crrev.com/f658e41d864267fb9e99ea76faa7758b0b63d5c9/test/inspector/runtime/console-assert.js
,
Nov 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/c1622945f71d52817568b6f830d138914b604d8a commit c1622945f71d52817568b6f830d138914b604d8a Author: machenbach <machenbach@chromium.org> Date: Wed Nov 23 15:53:43 2016 Revert of [inspector] make console.assert much faster (patchset #3 id:40001 of https://codereview.chromium.org/2505493002/ ) Reason for revert: Speculative revert as there seems to be a layout test crash: https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/11585 Please reland if it doesn't get green. Original issue's description: > [inspector] make console.assert much faster > > New console.assert implementation is faster then custom user implementation. > > BUG= chromium:663845 > R=dgozman@chromium.org > > Committed: https://crrev.com/f658e41d864267fb9e99ea76faa7758b0b63d5c9 > Cr-Commit-Position: refs/heads/master@{#41227} TBR=dgozman@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= chromium:663845 Review-Url: https://codereview.chromium.org/2521323005 Cr-Commit-Position: refs/heads/master@{#41231} [modify] https://crrev.com/c1622945f71d52817568b6f830d138914b604d8a/src/inspector/v8-console.cc [modify] https://crrev.com/c1622945f71d52817568b6f830d138914b604d8a/test/debugger/debug/debug-script.js [delete] https://crrev.com/1a4294b1811837e07cb5a9e8db0c2826f744aa9c/test/inspector/runtime/console-assert-expected.txt [delete] https://crrev.com/1a4294b1811837e07cb5a9e8db0c2826f744aa9c/test/inspector/runtime/console-assert.js
,
Nov 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/019d446c1e2d00ac61f1ecd4eeffdbe80a8cdb40 commit 019d446c1e2d00ac61f1ecd4eeffdbe80a8cdb40 Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Wed Nov 23 17:09:32 2016 [inspector] make console.assert much faster New console.assert implementation is faster then custom user implementation. BUG= chromium:663845 R=dgozman@chromium.org Committed: https://crrev.com/f658e41d864267fb9e99ea76faa7758b0b63d5c9 Review-Url: https://codereview.chromium.org/2505493002 Cr-Original-Commit-Position: refs/heads/master@{#41227} Cr-Commit-Position: refs/heads/master@{#41232} [modify] https://crrev.com/019d446c1e2d00ac61f1ecd4eeffdbe80a8cdb40/src/inspector/v8-console.cc [modify] https://crrev.com/019d446c1e2d00ac61f1ecd4eeffdbe80a8cdb40/src/inspector/v8-inspector-impl.cc [modify] https://crrev.com/019d446c1e2d00ac61f1ecd4eeffdbe80a8cdb40/src/inspector/v8-inspector-impl.h [modify] https://crrev.com/019d446c1e2d00ac61f1ecd4eeffdbe80a8cdb40/test/debugger/debug/debug-script.js [add] https://crrev.com/019d446c1e2d00ac61f1ecd4eeffdbe80a8cdb40/test/inspector/runtime/console-assert-expected.txt [add] https://crrev.com/019d446c1e2d00ac61f1ecd4eeffdbe80a8cdb40/test/inspector/runtime/console-assert.js
,
Nov 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b66d8ae9dc168c81845b28f36fcc9ae27522afd2 commit b66d8ae9dc168c81845b28f36fcc9ae27522afd2 Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Tue Nov 29 21:35:03 2016 [DevTools] remove old console.assert hack New console.assert implementation is faster then any hacks. BUG= chromium:663845 R=lushnikov@chromium.org Review-Url: https://codereview.chromium.org/2525543002 Cr-Commit-Position: refs/heads/master@{#435081} [modify] https://crrev.com/b66d8ae9dc168c81845b28f36fcc9ae27522afd2/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
,
Nov 29 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by kozyatinskiy@chromium.org
, Nov 10 2016