Rendering basics:
- DOM tree (🌲) "layouting" - when we care about the placement of HTML elements 🟥🟦🟩🟧
- DOM 🌲"painting" - adding in information within the HTML elements 🖌️🖼️🎨
- see process waterfall in DevTools > Network 🌊
Rendering basics (cont.):
- JavaScript is fundamentally used to change the DOM 🌲
- We might need to re-paint 🖌️
- Layout thrashing - be aware that this is a thing, requesting changes within the layout forcing client to resize
- the indexing system is a bunch of micro-services talking to each other 🤏
- indexing pipeline:
- duplicate elimination ✅❎
- crawler 🕷️
- link parser 🔗
- robots parser 🤖
- WRS 🔄
- content parser 🔪
+ service wrapper w/caching
- puppeteer, high level code to control a Chrome instance
steps:
1. get new instance of headless browser
2. go to page
- wait for network zero (also, set maximum timeout before killing)
3. get the HTML
4. when we have shadow DOM, more work required
- tools using WRS, though not using caching
- telling WRS shorter timeouts
- renderer:
- orchestration 🎼
- instrumentation 🎷
- metric collection - 4 internal debugging #⃣
+ pool manager 🎱 >> headless chrome
instrumentation 🎷: things r changed
- cookies are overwritten (b/c some sites require to use) 🍪
- cookies are not persistent 🗡️🍪
- date/time f(x) are adjusted 📅
- service workers are rejected ⛔️
- permission prompts are rejected ⛔️
🎷(cont.):
- random *might* be deterministic 🦖
- we are not painting pixel, animations = no go 🎞️⛔️
rendering stuffs:
- queue time (avg. 5 seconds) ⏲️
- render time 🔄