InspectorInstrumentation::NativeBreakpoint causes string allocations everywhere |
||
Issue descriptionGoogle Chrome 52.0.2743.0 (Official Build) canary (64-bit) Revision 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939} NativeBreakpoint takes a const String&, but everywhere its used callers pass a literal string, ex. InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(m_context, "requestAnimationFrame", true); this means we end up mallocing a temporary string just to pass into the NativeBreakpoint only to discard it whenever the inspector is not open. Near as I can tell this string is only used to concat with another string when the inspector is open too? This shows up in lots of profiles as string mallocs all over various things. NativeBreakpoint should take a const char* instead. :)
,
May 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/87a0cc1f353d4607abd5e7c948c2d05f2243a4a8 commit 87a0cc1f353d4607abd5e7c948c2d05f2243a4a8 Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Wed May 25 20:39:13 2016 [DevTools] Change name type in NativeBreakpoint to raw string All callers pass raw pointer as argument. We can avoid String allocation for each call when inspector is closed. BUG= 614457 R=dgozman@chromium.org Review-Url: https://codereview.chromium.org/2008153003 Cr-Commit-Position: refs/heads/master@{#395983} [modify] https://crrev.com/87a0cc1f353d4607abd5e7c948c2d05f2243a4a8/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp [modify] https://crrev.com/87a0cc1f353d4607abd5e7c948c2d05f2243a4a8/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.h
,
May 25 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by pfeldman@chromium.org
, May 24 2016Status: Assigned (was: Untriaged)