SERVO: TODAY & TOMORROW Jack Moffitt // Mozilla Research // - - PowerPoint PPT Presentation

servo today tomorrow
SMART_READER_LITE
LIVE PREVIEW

SERVO: TODAY & TOMORROW Jack Moffitt // Mozilla Research // - - PowerPoint PPT Presentation

SERVO: TODAY & TOMORROW Jack Moffitt // Mozilla Research // September 26, 2016 Goal Create a new browser engine making a generational leap in performance and robustness . Performance Through Parallelism Robustness From Rust WebAudio


slide-1
SLIDE 1

SERVO: TODAY & TOMORROW

Jack Moffitt // Mozilla Research // September 26, 2016

slide-2
SLIDE 2

Goal

Create a new browser engine making a generational leap in performance and robustness.

slide-3
SLIDE 3

Performance Through Parallelism

slide-4
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
SLIDE 5

Servo Nightly - download.servo.org

slide-6
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
SLIDE 7

The Branches

  • Parallel layout
  • Parallel styling
  • WebRender
  • Constellation
slide-8
SLIDE 8

PARALLEL STYLE & LAYOUT

slide-9
SLIDE 9

Servo vs. Gecko

slide-10
SLIDE 10

Servo vs. Gecko

slide-11
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
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
SLIDE 13

Stylo on Wikipedia

slide-14
SLIDE 14

Stylo on HTML5 Spec

slide-15
SLIDE 15

WEBRENDER

slide-16
SLIDE 16

WebRender Motivation

slide-17
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
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 19
slide-20
SLIDE 20
slide-21
SLIDE 21

CONSTELLATION

slide-22
SLIDE 22

SINGLE PIPELINE

slide-23
SLIDE 23

PIPELINE WITH CROSS-DOMAIN IFRAMES

slide-24
SLIDE 24

PIPELINE WITH SYNC IFRAMES

slide-25
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
SLIDE 26

MULTIPROCESS CONSTELLATION

slide-27
SLIDE 27

The New Branches

  • Constellation
  • Parallel layout
  • Parallel styling
  • WebRender
  • Magic DOM
  • Parallelize MORE
slide-28
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
SLIDE 29

Parallelism Experiments

  • JPEG decode (GPU)
  • PNG decode
  • Glyph rasterization (GPU)
slide-30
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
SLIDE 31

QUESTIONS