Skip to content

Improve performance of DefaultEmitter #35

@untitaker

Description

@untitaker

While implementing lycheeverse/lychee#480 I realized how slow the default emitter really is. It makes link extraction 10-40% slower than html5ever. It is currently not really possible to beat html5ever at all unless a custom emitter is implemented.

We could:

  • build another emitter that reuses strings, and calls a callback with borrowed strings instead. Therefore much closer to lol-html's API.
  • allow for custom allocators for all the strings we create -- similar to strtendril magic html5ever does (but definetly not using that crate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions