1 / 52

Netflix Webkit -Based UI for TV Devices

Netflix Webkit -Based UI for TV Devices. Matt McCarthy & Kim Trott Netflix July 29, 2011. Topics. What is Webkit TV UI? Why web? A/B testing Engineering for UI variation Performance for TV devices. what’s the big deal?. Webkit TV UI. 2’ UI vs. 10’ UI. 2’ UI. 10’ UI.

pegeen
Download Presentation

Netflix Webkit -Based UI for TV Devices

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Netflix Webkit-Based UIfor TV Devices Matt McCarthy & Kim Trott NetflixJuly 29, 2011

  2. Topics • What is Webkit TV UI? • Why web? • A/B testing • Engineering for UI variation • Performance for TV devices

  3. what’s the big deal? Webkit TV UI

  4. 2’ UI vs. 10’ UI 2’ UI 10’ UI

  5. Some Netflix Webkit TV UI devices …and many more

  6. I’m an open web. User Agent I’m a WebKit.

  7. we did think this through Why Web?

  8. Dynamic Updates

  9. Common Technology

  10. Dynamically Add Locale Support

  11. A/B Testing

  12. because you don’t know until you try A/B testing

  13. 2007

  14. Little Iteration in Native UI 2009

  15. Rapid Iteration in Web UI 2010 2010 2010 2010

  16. Core Metrics • Retention • Streaming hours

  17. Which UI led to the most streaming? Special Navigator 57.1% 56.3% Plus 58.5%

  18. Secondary Metrics • Application launch count • Hotkey engagement count • Discovery source (e.g. browsing, search, similar) • Which TV/movie category • Etc.

  19. What else does Netflix test? • Navigation schemes • Visual designs • Major UI concepts • Minor UI variations • Emphasis on movies vs. TV • Taste preference input (stars, survey…) • Presentation & explanation of recommendations • Movie discovery sources & algorithms (Queue, similar titles, genres, personalized genres…) • Recommendation algorithms • Movie list length, selection, & quantity • Website button placement, size & behavior • Website page load time • Box art size • Link/button labels • Streaming encoding quality • Streaming startup time • Sign-up design • Sign-up wizard flow • Almost every new feature …And a lot of other stuff over the last 10 years

  20. not just “very carefully” How we support vast variation

  21. Loose Coupling • Events • Dependency injection

  22. Example: Special

  23. Solve These • Which component handles the next keystroke? • How & where do we model navigation between components? • …And also, these components should be reusable between completely different UIs

  24. Solutions We’ve Tried & Abandoned • Tight coupling • Mediator pattern • DOM focus & events

  25. Current Solution: State Transition System • States as the C in MVC • Can drive state transitions • States are event handling contexts • User input • Programmatic events

  26. Search Input State Search Input State Search Input State Search Compound State Search Compound State Search Results State Search Results State

  27. building a lean, mean content browsing machine PERFORMANCE AND MEMORY

  28. Why do we worry? • Single-page, long-lived application • High volume of data & images • Require high performance • Range of device capabilities

  29. Device Ecosystem Video Memory CPU GPU Main Memory CPU Architecture Memory bus speed Graphics driver Network stack

  30. Device Ecosystem CPU: 3.2 GHz GPU: 550 MHz Memory: 512 MB CPU: 600 MHz  3.2 GHz Memory: 88 MB  512 MB

  31. Memory Budget • Total Memory • Operating System • Webkit • Netflix SDK • Network/Video Buffer • UI Budget

  32. Progressive enhancement Baseline Enhanced Animations Request throttling Cache sizes Data pre-fetching None enabled 5 concurrent Small Delayed, Small batches All enabled 20 concurrent Large Frequent, Larger batches

  33. Perceived Performance 0.1 second: Feeling of instantaneous response 1.0 second: Keeps flow of thought seamless 10 seconds:Keeps the user’s attention Nielsen 2010, 1993; Miller 1968; Card et al. 1991

  34. Ways to Improve Responsiveness • Provide immediate feedback on user input • Split up long running process • Mask and reduce perceived wait times • Background work and anticipate common requests

  35. Ways to Improve Responsiveness • Wait until the user settles for expensive operations or paints • Avoid DOM changes at the beginning of / during animations • Tune delays to find the sweet spot

  36. Provide Visual Cues

  37. Performance Evolution: Scrolling Rows Naïve implementation • Progressively inserted new DOM nodes • Animated very large DOM parent • Height ever-growing of DOM parent Bad: Performance degraded as you scrolled 1 2 3 4 5 6 7

  38. Performance Evolution: Scrolling Rows Optimized implementation • Recycle DOM nodes • Animate each row individually • Delaying modifying row until comes into viewport or the user settles Good: Performance consistent regardless of location 1 2 3 4 2 1 5

  39. Software (CPU) = slowerHardware (GPU) = faster

  40. CSS = SoftwareImage = Hardware • Avoid CSS gradients, boxshot shadows • Use images instead • Example: Full-screen CSS radial gradient • Paints were 13 times faster without it

  41. Eliminate paints

  42. Accelerated Compositing • Enables GPU acceleration of compositing parts of the page • Greatly benefits CSS animations

  43. Accelerated Compositing DOM Tree -> Render Tree -> RenderLayer Tree Software path • Changes to a render layer require repainting all overlapping layers Hardware path • Some render layers paint to their own backing surface (compositing layer) • Changes to a layer only repaint the contents of that layer

  44. Several ways to create layers • 3D transforms • Opacity changes • Accidental • Overlapping a layer • Render engine

  45. Leveraging layers • Safe CSS properties • Transforms • Opacity • Un-safe • Any other CSS properties • DOM manipulation

  46. Tips • Keep layers small • Don’t inadvertently create gigantic layers • Memory consumption = width x height x 4 (bit depth) • Animate smaller areas rather than large parts of the screen • Trial and error, testing important

  47. Show Compositing Borders

  48. Memory • Avoid unbounded growth • Minimize the number of throwaway objects • Use closures sparingly & only where necessary • Dynamically load and unload code

More Related