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

Issue 2243293002: Reduce memory and CPU resources on offline interstitial while idle. (Closed)

Created:
4 years, 4 months ago by edwardjung
Modified:
4 years, 4 months ago
Reviewers:
mmenke
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reduce memory and CPU resources on offline interstitial while idle. Previously the blink timer was running continuously using ~5% CPU whilst the game is not activated in a focused tab. + Add blink rate limit to 3 blinks. + Kill animation timer when game is not activated. This should mean a maximum of 21 seconds when the timer is running. After that the CPU usage drops to <1%. There are some event listeners still running to listen for when the easter egg is activated. BUG=633426 Committed: https://crrev.com/6417dc0d755a25243a88aa8d1a5c0cee19b9747e Cr-Commit-Position: refs/heads/master@{#413879}

Patch Set 1 #

Patch Set 2 : Add max blink count #

Patch Set 3 : Switch to activate check rather than crashed #

Total comments: 13

Patch Set 4 : Renamed game state flags for code clarity #

Patch Set 5 : Addressed review comments #

Total comments: 1

Patch Set 6 : Switch activation back to use update() to fix jumping animation jank #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -23 lines) Patch
M components/neterror/resources/offline.js View 1 2 3 4 5 17 chunks +27 lines, -23 lines 1 comment Download

Messages

Total messages: 23 (10 generated)
edwardjung
mmenke PTAL. This should resolve the excess CPU consumption. Thanks.
4 years, 4 months ago (2016-08-15 18:03:23 UTC) #4
mmenke
Is there some reason we have to constantly call update() every frame while he's just ...
4 years, 4 months ago (2016-08-15 19:23:32 UTC) #5
mmenke
https://codereview.chromium.org/2243293002/diff/40001/components/neterror/resources/offline.js File components/neterror/resources/offline.js (right): https://codereview.chromium.org/2243293002/diff/40001/components/neterror/resources/offline.js#newcode594 components/neterror/resources/offline.js:594: this.raq(); On 2016/08/15 19:23:32, mmenke wrote: > Would you ...
4 years, 4 months ago (2016-08-15 19:52:27 UTC) #6
edwardjung
On 2016/08/15 19:23:32, mmenke wrote: > Is there some reason we have to constantly call ...
4 years, 4 months ago (2016-08-16 21:06:20 UTC) #7
mmenke
On 2016/08/16 21:06:20, edwardjung wrote: > On 2016/08/15 19:23:32, mmenke wrote: > > Is there ...
4 years, 4 months ago (2016-08-16 21:22:35 UTC) #8
edwardjung
On 2016/08/16 21:22:35, mmenke wrote: > On 2016/08/16 21:06:20, edwardjung wrote: > > On 2016/08/15 ...
4 years, 4 months ago (2016-08-17 01:05:41 UTC) #9
edwardjung
> The confuses me - if we're doing so little work most of the time, ...
4 years, 4 months ago (2016-08-23 12:41:33 UTC) #10
mmenke
On 2016/08/23 12:41:33, edwardjung wrote: > > The confuses me - if we're doing so ...
4 years, 4 months ago (2016-08-23 14:38:45 UTC) #11
edwardjung
> I think this is fine for now, LGTM. Does seem unfortunate that > RequestAnimationFrame ...
4 years, 4 months ago (2016-08-23 16:13:55 UTC) #12
mmenke
On 2016/08/23 16:13:55, edwardjung wrote: > > I think this is fine for now, LGTM. ...
4 years, 4 months ago (2016-08-23 17:30:04 UTC) #13
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/2243293002/100001
4 years, 4 months ago (2016-08-23 22:50:36 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-23 22:56:10 UTC) #21
commit-bot: I haz the power
4 years, 4 months ago (2016-08-23 22:57:41 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/6417dc0d755a25243a88aa8d1a5c0cee19b9747e
Cr-Commit-Position: refs/heads/master@{#413879}

Powered by Google App Engine
This is Rietveld 408576698