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

Issue 2935973002: iOS: Cache the result of IsRunningOnIOS10OrLater() (Closed)

Created:
3 years, 6 months ago by kapishnikov
Modified:
3 years, 6 months ago
CC:
chromium-reviews, danakj+watch_chromium.org, ios-reviews_chromium.org, vmpstr+watch_chromium.org, mef
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

iOS: Cache the result of IsRunningOnIOS10OrLater() The IsRunningOnIOS10OrLater() is called for every ComputeCurrentTicks() invocation. Some profiling results have shown that the call may take 0.6% of the total network CPU utilization of the network thread. BUG=724546 Review-Url: https://codereview.chromium.org/2935973002 Cr-Commit-Position: refs/heads/master@{#479692} Committed: https://chromium.googlesource.com/chromium/src/+/71f40c3bd210c7450cbd2e171578c1d950750346

Patch Set 1 #

Patch Set 2 : Moved the variable to the outer anonymous namespace #

Total comments: 5

Patch Set 3 : Added synchronization #

Patch Set 4 : Reverted expiring_cache_unittest.cc changed by mistake #

Patch Set 5 : Caching simplification #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M base/ios/ios_util.mm View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (8 generated)
kapishnikov
PTAL
3 years, 6 months ago (2017-06-13 16:49:14 UTC) #3
Eugene But (OOO till 7-30)
+Rohit I've updated CL description to fit 72 symbols. https://codereview.chromium.org/2935973002/diff/20001/base/ios/ios_util.mm File base/ios/ios_util.mm (right): https://codereview.chromium.org/2935973002/diff/20001/base/ios/ios_util.mm#newcode25 base/ios/ios_util.mm:25: ...
3 years, 6 months ago (2017-06-14 00:59:48 UTC) #6
rohitrao (ping after 24h)
Caching this seems like a good idea if it's showing up as a hotspot. Is ...
3 years, 6 months ago (2017-06-14 01:10:14 UTC) #7
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2935973002/diff/20001/base/ios/ios_util.mm File base/ios/ios_util.mm (right): https://codereview.chromium.org/2935973002/diff/20001/base/ios/ios_util.mm#newcode25 base/ios/ios_util.mm:25: enum { kUnknown, kIos9orEarlier, kIos10orLater } g_ios_version = kUnknown; ...
3 years, 6 months ago (2017-06-14 01:31:53 UTC) #8
kapishnikov
On 2017/06/14 00:59:48, Eugene But wrote: > +Rohit > I've updated CL description to fit ...
3 years, 6 months ago (2017-06-14 02:03:08 UTC) #9
kapishnikov
On 2017/06/14 01:10:14, rohitrao (ping after 24h) wrote: > Caching this seems like a good ...
3 years, 6 months ago (2017-06-14 02:14:41 UTC) #10
Eugene But (OOO till 7-30)
On 2017/06/14 02:14:41, kapishnikov wrote: > On 2017/06/14 01:10:14, rohitrao (ping after 24h) wrote: > ...
3 years, 6 months ago (2017-06-14 03:26:07 UTC) #11
rohitrao (ping after 24h)
> https://codereview.chromium.org/2935973002/diff/20001/base/ios/ios_util.mm#newcode35 > > base/ios/ios_util.mm:35: if (g_ios_version == kUnknown) { > > This makes the ...
3 years, 6 months ago (2017-06-14 12:15:55 UTC) #12
kapishnikov
On 2017/06/14 01:10:14, rohitrao (ping after 24h) wrote: > Caching this seems like a good ...
3 years, 6 months ago (2017-06-14 16:11:35 UTC) #13
kapishnikov
I have uploaded a new patch with dispatch_once invocation. PTAL. A local profiling has shown ...
3 years, 6 months ago (2017-06-14 20:35:06 UTC) #14
Eugene But (OOO till 7-30)
On 2017/06/14 20:35:06, kapishnikov wrote: > I have uploaded a new patch with dispatch_once invocation. ...
3 years, 6 months ago (2017-06-14 23:58:48 UTC) #16
rohitrao (ping after 24h)
On 2017/06/14 23:58:48, Eugene But wrote: > On 2017/06/14 20:35:06, kapishnikov wrote: > > I ...
3 years, 6 months ago (2017-06-15 00:11:47 UTC) #17
kapishnikov
On 2017/06/15 00:11:47, rohitrao (ping after 24h) wrote: > On 2017/06/14 23:58:48, Eugene But wrote: ...
3 years, 6 months ago (2017-06-15 03:52:12 UTC) #18
Eugene But (OOO till 7-30)
Thanks! lgtm I guess it's ok if we'll have to add caching to IsRunningOnIOS12OrLater and ...
3 years, 6 months ago (2017-06-15 04:04:02 UTC) #19
rohitrao (ping after 24h)
lgtm The "duplicated" caching here is so small that it doesn't bother me. It'll also ...
3 years, 6 months ago (2017-06-15 11:50:13 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2935973002/80001
3 years, 6 months ago (2017-06-15 13:58:29 UTC) #22
commit-bot: I haz the power
3 years, 6 months ago (2017-06-15 14:10:51 UTC) #25
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/71f40c3bd210c7450cbd2e171578...

Powered by Google App Engine
This is Rietveld 408576698