notifio.app is 38 pages of mostly text, with four animated product mockups on the homepage. I have measured those mockups from the CPU side before, where they cost about 7.4 seconds of main thread per minute, forever . This is the same animations seen by the compositor instead, which turned out to rank them in the opposite order.
I did this once before on a sibling site, where a static FAQ page runs on 10 compositing layers . That post read one page. This one reads 38 and then watches them do nothing for 20 seconds.
Reading the layer tree
LayerTree is a CDP domain, and the tree is pushed as an event rather than fetched, only when it changes. So you have to enable it, make something change, and keep the last event:
const cdp = await ctx . newCDPSession ( page ) ; cdp . on ( 'LayerTree.layerTreeDidChange' , ( e ) => { if ( e . layers ) latest = e . layers ; } ) ; await cdp . send ( 'LayerTree.enable' ) ; await page . goto ( url ) ; await page .…