Open Bug 1429953 Opened 7 years ago Updated 2 years ago

Baldr: tier 1 compile time 4x worse while tier 2 in progress on mobile

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox60 --- fix-optional

People

(Reporter: luke, Unassigned)

References

(Blocks 3 open bugs)

Details

STR: 1. load http://lukewagner.github.io/test-tanks-compile-time 2. see awesome compile speed (I see 8mb/s) 3. reload within 20s 4. see meh compile speed (I see 1.7mb/s) I was testing on a midrange 4-core phone. I think our tier 1/2 prioritization scheme is giving fewer cores to the tier1 than it should?
Summary: Baldr: tier 1 compile time 4x worse while tier 2 in progress → Baldr: tier 1 compile time 4x worse while tier 2 in progress on mobile
Yeah, pile it on - the scheduler needs a real sense of priority :) This could be a consequence of prioritizing pending tier2 tasks when the tier2 task list is very long, so if the tier2 tasks from the first load linger (why should they? they should be canceled) then they could be blocking new tier1 work. I'll devote some time to this next week if you don't beat me to it.
(In reply to Lars T Hansen [:lth] from comment #1) > (why should they? they should be canceled) I think the only thing that causes cancellation is the JSRuntime being torn down and navigating or reloading a page don't destroy any JSRuntimes. I expect in a reload situation we soon GC the now-inaccessible pages' Module object, so if we had ~Module cancel its tier-2 task (it doesn't currently), that would help. However, when navigating (not reloading), the browser's "BF Cache" keeps the previous page alive in memory (so if you click Back, it's real fast). So I think while something along the lines of cancelation could help, prioritization seems important. I wonder if we could, via embedding hooks, imbue a tier-2 task knowledge of whether it was for a foreground tab or not. But maybe there's just a simple static scheduling fix. > I'll devote some time to this next week if you don't beat me to it. Thanks. I don't think it's a huge problem, but I thought it was worth looking at in case there was an easy fix. (To wit, our "meh" compile speed is still factors better than other browsers that don't have baselines.)
Blocks: 1435997
Priority: -- → P2
Component: JavaScript Engine → Javascript: WebAssembly
Depends on: 1590305
Blocks: 1590305
No longer depends on: 1590305
Type: defect → enhancement
Priority: P2 → P3

We'll need to use the real scheduler and set tier 2 priority lower.

Depends on: 1559660
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.