Bug 111247 - Threaded HTML Parser should parse the first chunk on the main thread
Summary: Threaded HTML Parser should parse the first chunk on the main thread
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 111645
  Show dependency treegraph
 
Reported: 2013-03-02 01:59 PST by Eric Seidel (no email)
Modified: 2023-09-20 19:59 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2013-03-02 01:59:53 PST
Threaded HTML Parser should parse the first chunk on the main thread

We may have to be slightly more careful about which bool we check, as we'll be in threaded mode w/o having started a background parser yet.  But right before we would yield, we just pass our Tokenizer and HTMLToken off to a newly started background parser and then yield the main thread.

I suspect this should be a win for small (<1k token) documents which can be parsed in a single chunk.
Comment 1 Adam Barth 2013-03-02 23:39:32 PST
Yeah, this seems like it should be faster.  We should fine a way to test the performance before landing it.  The HTML spec parsing benchmark probably isn't the right thing since it's a big document.  Maybe we should measure with telemetry's top25 page set?
Comment 2 Eric Seidel (no email) 2013-03-02 23:42:57 PST
Yes, I think Telemetry will be more interesting here.  Something with lots of small resources should hit this?

Then again, now that I think about it, I'm not sure small pages even show up in parse time given all the rest of the loader overhead.  I suspect what this would actually make faster is the layout tests. :)
Comment 3 Ahmad Saleem 2023-09-20 17:46:49 PDT
@Chris - Do we have this or we can close this and blocker bugs in META bug?
Comment 4 Chris Dumez 2023-09-20 19:59:39 PDT
We are not using a multi-threaded HTML parser.