WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
169077
Disable JavaScript JIT in non-audible background tabs
https://bugs.webkit.org/show_bug.cgi?id=169077
Summary
Disable JavaScript JIT in non-audible background tabs
Andreas Kling
Reported
2017-03-02 04:42:09 PST
We already discard all JIT code when coming under memory pressure. We should also stop generating new code until the pressure comes back down, to avoid sawtoothing.
Attachments
Proposed patch
(1.72 KB, patch)
2017-03-02 04:42 PST
,
Andreas Kling
no flags
Details
Formatted Diff
Diff
Proposed patch
(3.33 KB, patch)
2017-04-06 17:06 PDT
,
Andreas Kling
fpizlo
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2017-03-02 04:42:58 PST
Created
attachment 303191
[details]
Proposed patch
Andreas Kling
Comment 2
2017-03-02 13:37:56 PST
Comment on
attachment 303191
[details]
Proposed patch Let's only do this for non-visible tabs as a first cut.
Saam Barati
Comment 3
2017-03-02 15:36:37 PST
LGTM
Andreas Kling
Comment 4
2017-03-24 10:42:39 PDT
Let's try doing this for processes that are inactive (haven't been foreground active for an hour and are not playing sound)
Andreas Kling
Comment 5
2017-04-06 17:00:46 PDT
<
rdar://problem/31038556
>
Andreas Kling
Comment 6
2017-04-06 17:06:47 PDT
Created
attachment 306440
[details]
Proposed patch
Filip Pizlo
Comment 7
2017-04-10 06:14:33 PDT
Comment on
attachment 306440
[details]
Proposed patch I'm not sure any of this is a good idea. What if the background tab starts doing computation? The llint can be 10,000x slower in extreme cases. That's a lot of wasted power. It could even be a spin when you go back to that tab. I don't think we want this.
Filip Pizlo
Comment 8
2017-04-10 06:20:12 PDT
What if instead, background tab meant that the thresholds for hiring are scaled higher? Could be 3x higher or something. That would ensure that in my scenario, the hot code will tier up and not waste as much power. But even this feels somehow wrong. The JIT thresholds are the way that they are because we think that they will make the code run faster and use less power. If some code causes us to instead waste power by JITing too much, then maybe our thresholds are wrong for all kinds of tabs. Can you provide context for why you think this is good?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug