Data oriented design in practice
summary
Claims that reworking a browser animation subsystem into C++ data oriented layouts yields real gains the author shows a custom engine hitting smooth 60fps versus Chromium s choppy run and measures 6× faster for animation ticks Tools include templates for static polymorphism, copying animation definitions, and structs-of-arrays per property a central animation controller that emits arrays of new values and uses existence-based predication to avoid branches The build actually runs faster and scales to threads but costs ergonomics and harder quick edits.
AI-written summary · about
chapters (44)
- 0:00Intro
- 3:41DEMO video of performance on Android
- 4:27Agenda
- 5:03OOP marries data with operations...
- 10:05Data-oriented design & OOP
- 11:35What is a CSS Animation?
- 12:27Animation definition
- 13:58The OOP way (chromium 66)
- 15:36The flow
- 17:01The state
- 19:15Updating time and values
- 21:17Interpolate different types of values
- 22:19Apply the new value
- 25:11Recap
- 25:47Back to the drawing board
- 27:18The Animation Controller
- 28:42Go flat!
- 29:17Two approaches to keep the definition
- 30:18Avoid type erasure
- 32:05Memory layout comparison
- 32:46Ticking animations
- 34:21Avoiding branches
- 35:25A little bit of code
- 36:03Adding an API - Controlling Animations
- 37:15Implementing the DOM API cont.
- 37:30Analogous concepts comparison
- 37:44Key points
- 38:59Style solving
- 39:51The DOM tree styling walk
- 41:43Issues with top-down algorithm
- 42:02Data-oriented design approach
- 43:03Gather children and sort
- 43:51Compute styles for Elements and Nodes
- 44:25Classify changes for next steps in pipeline
- 44:46Each phase uses different data
- 45:53Nodes with Components
- 46:59Performance analysis
- 47:53Scalability
- 48:34Multithreaded animation system
- 48:50Testability analysis
- 49:14Modifiability analysis
- 50:32Downsides of DoD
- 51:29When OOP?
- 52:53References
related talks
40mUsing Data-Oriented Design to Build Apps Better
27mSmooth Moves: Rendering at the Speed of Right ®
51mData Orientation For The Win!
49mRendering without lumpy bits
20mTo hell with jQuery
29mWatch your back, Browser! You're being observed
32mManaging animations (sanely) in (insanely) complex apps
09mRich Animation
