Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Issue 27058002: Cache results from respondsToSelector. (Closed)

Created:
7 years, 2 months ago by ccameron
Modified:
7 years, 2 months ago
CC:
blink-reviews, nduca, viettrungluu
Visibility:
Public.

Description

Use an observer for preferredScrollerStyle instead of querying it. This came up as a hotspot in layout. BUG=303205 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=159812

Patch Set 1 #

Patch Set 2 : Make similar #

Total comments: 2

Patch Set 3 : Use static #

Patch Set 4 : Use static #

Patch Set 5 : Use static #

Patch Set 6 : Add observer #

Patch Set 7 : Fix whitespace #

Patch Set 8 : Fix whitespace again #

Total comments: 8

Patch Set 9 : Incorporate review feedback #

Patch Set 10 : Incorporate review feedback #

Total comments: 1

Patch Set 11 : Add hot warning #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -14 lines) Patch
M Source/core/core.gyp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/platform/mac/NSScrollerImpDetails.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +51 lines, -13 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
ccameron
7 years, 2 months ago (2013-10-11 18:52:01 UTC) #1
ccameron
On 2013/10/11 18:52:01, ccameron1 wrote: This mirrors what we do a few lines before in ...
7 years, 2 months ago (2013-10-11 18:53:58 UTC) #2
Nico
I'd guess most of these calls aren't hot (this is the first time I've seen ...
7 years, 2 months ago (2013-10-11 19:48:47 UTC) #3
ccameron (do not use)
> On Oct 11, 2013, at 14:48, thakis@chromium.org wrote: > > I'd guess most of ...
7 years, 2 months ago (2013-10-11 19:55:15 UTC) #4
ccameron
Thanks! On 2013/10/11 19:48:47, Nico wrote: > I'd guess most of these calls aren't hot ...
7 years, 2 months ago (2013-10-11 21:24:21 UTC) #5
Nico
On Fri, Oct 11, 2013 at 2:24 PM, <ccameron@chromium.org> wrote: > Thanks! > > > ...
7 years, 2 months ago (2013-10-11 21:27:18 UTC) #6
ccameron
Okay, updated to use static now. I never saw the 8% utilization, but this patch ...
7 years, 2 months ago (2013-10-15 04:09:07 UTC) #7
esprehn
On 2013/10/15 04:09:07, ccameron1 wrote: > Okay, updated to use static now. I never saw ...
7 years, 2 months ago (2013-10-15 07:24:44 UTC) #8
esprehn
I added the trace and steps to reproduce: https://code.google.com/p/chromium/issues/detail?id=303205#c6 respondsToSelector is only a small portion ...
7 years, 2 months ago (2013-10-15 07:34:10 UTC) #9
Nico
Slightly less cryptic: Is there any advantage of your patch over just static bool respondsToSelectorPreferredScrollerStyle ...
7 years, 2 months ago (2013-10-15 15:21:12 UTC) #10
ccameron
It turns out that the big hotspot (~8-15%) only happens with an external mouse (and ...
7 years, 2 months ago (2013-10-15 21:47:52 UTC) #11
eseidel
lgtm Wow. I suspect this basically never changes. I'm surprised we can get this kind ...
7 years, 2 months ago (2013-10-15 21:51:02 UTC) #12
eseidel
I should note: although I feel confident reviewing Obj-C changes, and core/ changes, you probably ...
7 years, 2 months ago (2013-10-15 21:52:02 UTC) #13
ccameron
On 2013/10/15 21:51:02, eseidel wrote: > lgtm > > Wow. > > I suspect this ...
7 years, 2 months ago (2013-10-15 21:55:41 UTC) #14
eseidel
https://codereview.chromium.org/27058002/diff/31001/Source/core/platform/mac/NSScrollerImpDetails.mm File Source/core/platform/mac/NSScrollerImpDetails.mm (right): https://codereview.chromium.org/27058002/diff/31001/Source/core/platform/mac/NSScrollerImpDetails.mm#newcode54 Source/core/platform/mac/NSScrollerImpDetails.mm:54: if (self) { I might have written if (!self)\n ...
7 years, 2 months ago (2013-10-15 21:56:01 UTC) #15
eseidel
I'm happy to make incremental progress. We can make isOverlayScrollbar a global if we need ...
7 years, 2 months ago (2013-10-15 21:57:10 UTC) #16
eseidel
https://codereview.chromium.org/27058002/diff/31001/Source/core/platform/mac/NSScrollerImpDetails.mm File Source/core/platform/mac/NSScrollerImpDetails.mm (right): https://codereview.chromium.org/27058002/diff/31001/Source/core/platform/mac/NSScrollerImpDetails.mm#newcode69 Source/core/platform/mac/NSScrollerImpDetails.mm:69: g_scrollerStyle = [NSScroller preferredScrollerStyle]; Do we need to tell ...
7 years, 2 months ago (2013-10-15 21:57:52 UTC) #17
Nico
lgtm Wow, surprising. viettrungluu is thinking about removing the ui runloop from the renderer ( ...
7 years, 2 months ago (2013-10-15 22:00:13 UTC) #18
ccameron
Thanks!! https://codereview.chromium.org/27058002/diff/31001/Source/core/platform/mac/NSScrollerImpDetails.mm File Source/core/platform/mac/NSScrollerImpDetails.mm (right): https://codereview.chromium.org/27058002/diff/31001/Source/core/platform/mac/NSScrollerImpDetails.mm#newcode54 Source/core/platform/mac/NSScrollerImpDetails.mm:54: if (self) { On 2013/10/15 22:00:14, Nico wrote: ...
7 years, 2 months ago (2013-10-15 22:19:01 UTC) #19
Nico
https://codereview.chromium.org/27058002/diff/45001/Source/core/platform/mac/NSScrollerImpDetails.mm File Source/core/platform/mac/NSScrollerImpDetails.mm (right): https://codereview.chromium.org/27058002/diff/45001/Source/core/platform/mac/NSScrollerImpDetails.mm#newcode87 Source/core/platform/mac/NSScrollerImpDetails.mm:87: // The ScrollerStyleObserver will update g_scrollerStyle at init and ...
7 years, 2 months ago (2013-10-15 22:20:44 UTC) #20
ccameron
Added the hot warning & putting in the CQ (I see some layout failures, but ...
7 years, 2 months ago (2013-10-15 23:49:18 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/27058002/52001
7 years, 2 months ago (2013-10-15 23:51:45 UTC) #22
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=11540
7 years, 2 months ago (2013-10-16 02:26:59 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/27058002/52001
7 years, 2 months ago (2013-10-16 17:36:31 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/27058002/52001
7 years, 2 months ago (2013-10-16 20:38:54 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/27058002/52001
7 years, 2 months ago (2013-10-17 01:32:15 UTC) #26
commit-bot: I haz the power
7 years, 2 months ago (2013-10-17 02:27:27 UTC) #27
Message was sent while issue was closed.
Change committed as 159812

Powered by Google App Engine
This is Rietveld 408576698