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

Issue 580173003: Set IdleHandler timer on background threads a minimum of 30s in the future after initial run. (Closed)

Created:
6 years, 3 months ago by sullivan
Modified:
6 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, tonyg
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Set IdleHandler timer on background threads a minimum of 30s in the future after initial run. BUG=394187 Committed: https://crrev.com/cd45a3ee8f4ebb2adf7daf383a83267f8dbe5f3b Cr-Commit-Position: refs/heads/master@{#295705}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Clarify comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M content/renderer/render_thread_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (3 generated)
sullivan
I've sent out some perf tryjobs for energy cases, are there other perf tests I ...
6 years, 3 months ago (2014-09-18 18:56:22 UTC) #2
jochen (gone - plz use gerrit)
we don't have a good test for this if it helps with battery live, lgtm
6 years, 3 months ago (2014-09-18 19:00:56 UTC) #3
sullivan
On 2014/09/18 19:00:56, jochen wrote: > we don't have a good test for this What ...
6 years, 3 months ago (2014-09-18 19:06:34 UTC) #4
jochen (gone - plz use gerrit)
On 2014/09/18 at 19:06:34, sullivan wrote: > On 2014/09/18 19:00:56, jochen wrote: > > we ...
6 years, 3 months ago (2014-09-19 13:28:00 UTC) #5
sullivan
On 2014/09/19 13:28:00, jochen (slow for reviews) wrote: > On 2014/09/18 at 19:06:34, sullivan wrote: ...
6 years, 3 months ago (2014-09-19 13:39:08 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/580173003/1
6 years, 3 months ago (2014-09-19 13:40:05 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1) as 340fa0241a8d998b75668a2c6fdfc676fc134068
6 years, 3 months ago (2014-09-19 14:39:25 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/cd45a3ee8f4ebb2adf7daf383a83267f8dbe5f3b Cr-Commit-Position: refs/heads/master@{#295705}
6 years, 3 months ago (2014-09-19 14:39:59 UTC) #10
pasko
fly by review.. (I am exercising my math) https://codereview.chromium.org/580173003/diff/1/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (left): https://codereview.chromium.org/580173003/diff/1/content/renderer/render_thread_impl.cc#oldcode1030 content/renderer/render_thread_impl.cc:1030: // ...
6 years, 2 months ago (2014-10-09 09:32:14 UTC) #12
sullivan
6 years, 2 months ago (2014-10-10 20:55:27 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/580173003/diff/1/content/renderer/render_thre...
File content/renderer/render_thread_impl.cc (left):

https://codereview.chromium.org/580173003/diff/1/content/renderer/render_thre...
content/renderer/render_thread_impl.cc:1030: // kInitialIdleHandlerDelayMs in
RenderThreadImpl::WidgetHidden.
On 2014/10/09 09:32:14, pasko wrote:
> why deleting this comment?

It was a little misleading, since it's reset to kInitialIdleHandlerDelayMs (1s)
but then below immediately limited to kLongIdleHandlerDelayMs (30s) on the next
run.

So the previous behavior was that the tab is backgrounded and timers would fire
1s, 1s, 1s, 1s, 2s, 2s... and now the behavior is the tab is backgrounded and
timers fire 1s, 30s, 30s, 30s....

I felt that it was clearer to add the comment on line 1020 instead:

When the tab is originally hidden, an invocation
is scheduled for kInitialIdleHandlerDelayMs in
RenderThreadImpl::WidgetHidden in order to race to a minimal heap.
After that, idle calls can be much less frequent, so run at a maximum of
once every kLongIdleHandlerDelayMs.

https://codereview.chromium.org/580173003/diff/1/content/renderer/render_thre...
File content/renderer/render_thread_impl.cc (right):

https://codereview.chromium.org/580173003/diff/1/content/renderer/render_thre...
content/renderer/render_thread_impl.cc:1028: //    30s, 30, 30, 31, 31, 31, 31,
32, 32, ...
On 2014/10/09 09:32:14, pasko wrote:
> with the new formula the series is actually growing slower:
> (30s) would be repeated >30 times,
> followed by (31s) repeated >30 times,
> .. and so on
> 
> (I am assuming the series start from kInitialIdleHandlerDelayMs)
> 
> That's probably aligned with your intentions, but the comment is now more
> confusing.

I added a new patch to try and clarify the comments, but I'm having difficulty
explaining it clearly. Suggestions welcome!

Powered by Google App Engine
This is Rietveld 408576698