Created attachment 172676 [details]
dtrace script for counting layouts
STEPS TO REPRODUCE:
1. Go to http://en.wikipedia.org/wiki/Steve_jobs
--> ~16000 layouts
2. Go to http://en.wikipedia.org/wiki/Banksia_ilicifolia
--> ~4000 layouts
I'm attaching a dtrace script I used to count layouts.
printf shows about 20 layouts loading http://en.wikipedia.org/wiki/Steve_jobs. Ur script is bad.
Created attachment 172678 [details]
Previous script matched every FrameView*layout* method, like FrameView::layoutRoot(). Even the current script doesn't detect when we bail early from layout().
OK. 20 is still a lot more than 1. Instruments shows that 80% of wikipedia article load time is layout. Is there some improvement we can make here?
There are surely improvements we can make but 1 layout is not a realistic expectation for a page that does dynamic style manipulation during loading.
Created attachment 172859 [details]
dtrace script for counting layouts -- with recursion guard and more precision
Added recursion guard.