-
Notifications
You must be signed in to change notification settings - Fork 83
Conversation
Hmm, it sounds like the data is getting a bit hard to interpret because of the streaming technique we are doing. That is, it isn't giving us very much insight into the cost of the DOM itself. What about trying something different, where we read the entire spec into memory using |
uhm, what about getting it as a string and |
Yeah, I guess we should check that too, although it feels like without the ability to break up the work into chunks, it'll just jank for a very long time. |
I just did a test with innerHTML, here the results
|
Hmm, that's not so bad I think, although janking for a third of a second (on desktop, I presume) is not good and we'd want to break that up into chunks with requestIdleCallback or similar. But the total time being around that much seems promising to me? |
The spec time measurement shows that it takes around 1.2+ seconds to have all the spec loaded and ready, even if in chunks - the HTMLSpec class creates and attaches a hidden I'm not sure what's the overhead of iframe vs div, but the fact that iframe takes care of parsing so nicely makes it worth it. Maybe with more structured data we can write a simple parser? |
Yeah I think we'd have more structured data in a realistic version of the spec-viewer (e.g., on a news reader site that was using this for a long article, or something). So it's not worth worrying about that part too much. Would it be easy to get these numbers on mobile devices? Preferably both a high-end one and a low-end one, although whatever you have lying around is fine. |
Will have some numbers tomorrow - I got a low-end device to torture 😁 |
Got new numbers! updated the description, PTAL! |
Doing some housekeeping and closing this PR; thanks so much for the very-useful measurements, which will definitely be guiding us going forward. |
Testing out some ideas for indexability/find-in-page, in particular, how much does it take to append the whole HTML Spec in a template vs a div?
Here the averages of 5 runs on Chrome Canary v69.0.3451.0.
Mac Book Pro Retina 15" 2015
Pixel 2 XL
Hauwei Y5 Lite 2017
@domenic @ojanvafai @graynorton FYI