SLIDE 1 SERVO: TODAY & TOMORROW
Jack Moffitt // Mozilla Research // September 26, 2016
SLIDE 2
Goal
Create a new browser engine making a generational leap in performance and robustness.
SLIDE 3
Performance Through Parallelism
SLIDE 4 Robustness From Rust
- WebAudio implementation in Firefox had 34 security
critical bugs
- All were array out of bounds or use after free errors
- All would have been prevented by the Rust compiler
SLIDE 5
Servo Nightly - download.servo.org
SLIDE 6
Servo Nightly Reception
“It's definitely slower to actually load pages — I'm guessing that there are still a lot of network optimizations that more mature codebases have accrued that Servo hasn't yet — but holy cow are pages buttery smooth once they do load (and even while they're loading, which is unusual). Comparing Chrome and Servo in terms of UI jank felt pretty shocking, in Servo's favor. Kudos, it looks like Rust and WebRender have paid off.” - reissbaker
SLIDE 7 The Branches
- Parallel layout
- Parallel styling
- WebRender
- Constellation
SLIDE 8
PARALLEL STYLE & LAYOUT
SLIDE 9
Servo vs. Gecko
SLIDE 10
Servo vs. Gecko
SLIDE 11 Power Performance
- Running cores at a lower voltage reduces performance
by 30% but power usage by 40%
- Servo can make up this performance loss through
parallelism, achieving the same performance with 40% less power
SLIDE 12 Stylo
- Goal: Replace the CSS styling system in Gecko with the
parallel version from Servo
- Initial experiments showed same performance gain when
used in Gecko
- Telemetry shows ~95% of Firefox users will get at least 2x
speedup, and ~50% will get at least 4x.
- First major uplift of Servo technology into Firefox
SLIDE 13
Stylo on Wikipedia
SLIDE 14
Stylo on HTML5 Spec
SLIDE 15
WEBRENDER
SLIDE 16
WebRender Motivation
SLIDE 17 WebRender in a Nutshell
- Hard to optimize immediate mode
- Retained mode graphics are better suited to GPUs
- Web pages are basically scene graphs, which can be sent
to the GPU all at once
- Parallel CPU side preprocessing for some things (batch
creation, font rasterization, border-radius, etc)
SLIDE 18 WebRender Progress
- Landed in Servo
- Optimized and fixed bugs
- Shipped in Servo nightly in June
- New design prototyped
- New design finished and landed
SLIDE 19
SLIDE 20
SLIDE 21
CONSTELLATION
SLIDE 22
SINGLE PIPELINE
SLIDE 23
PIPELINE WITH CROSS-DOMAIN IFRAMES
SLIDE 24
PIPELINE WITH SYNC IFRAMES
SLIDE 25 BENEFITS OF PIPELINES
- iframes don’t block their parent page or each other
- Layout and JavaScript don’t always block each other
- Many failures can be handled independently
SLIDE 26
MULTIPROCESS CONSTELLATION
SLIDE 27 The New Branches
- Constellation
- Parallel layout
- Parallel styling
- WebRender
- Magic DOM
- Parallelize MORE
SLIDE 28 Magic DOM
- Explore ways to achieve significant performance wins in
JS / DOM integration
- Discussed for years, but a concrete proposal presented
last year seemed fairly promising
- Fusing reflectors and DOM objects
- Self hosted JS
SLIDE 29 Parallelism Experiments
- JPEG decode (GPU)
- PNG decode
- Glyph rasterization (GPU)
SLIDE 30 External Research Collaborations
- Machine learning (Rohit Zambre at UC Irvine)
- Power management (Connor Imes at U. Chicago)
- Incremental computation (Kyle Headley at U. Colorado)
- WebBluetooth (Gabor Loki et al, University of Szeged)
- Software transactional memory (Alan Jeffrey)
SLIDE 31
QUESTIONS