Skip to content

Investigate performance #2

@latentflip

Description

@latentflip

So I took the html parser benchmark, and tweaked it to work in a browser. The repo is here: http://github.com/latentflip/html-parser-bench and it's running at http://latentflip.com/html-parser-bench. It has four test pages, which in the browser I'm only running one at a time since they take a while.

Some interesting results, first off, in all my desktop browsers, seems htmlparser2 to be faster, somewhere between marginally and 2x faster depending on the test/when I run it, but on my phone html-parse-stringify is marginally faster.

That repo will also dump out the bundled/minified/gzipped sizes:

2.7K html-parse-stringify
1.2K html-parse-stringify.gz
145K htmlparser2
38K htmlparser2.gz
260K parse5
42K parse5.gz

So, anyway, might be useful for getting a handle on perf/size status. It seems like we should be able to beat htmlparser2 given the tradeoffs we're making.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions