{"id":24986918,"url":"https://github.com/rinpatch/fast_html","last_synced_at":"2025-03-29T10:47:16.909Z","repository":{"id":273828013,"uuid":"249553119","full_name":"rinpatch/fast_html","owner":"rinpatch","description":"Elixir/Erlang bindings for lexborisov's myhtml. THIS IS A MIRROR, real repo at https://git.pleroma.social/pleroma/elixir-libraries/fast_html","archived":false,"fork":false,"pushed_at":"2020-09-01T11:59:49.000Z","size":1494,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T11:43:41.293Z","etag":null,"topics":["elixir","html-parser"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rinpatch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-23T21:57:23.000Z","updated_at":"2023-07-25T14:34:02.000Z","dependencies_parsed_at":"2025-01-23T08:19:33.053Z","dependency_job_id":"384f8186-471d-433f-9ec6-0c7ae08aeb23","html_url":"https://github.com/rinpatch/fast_html","commit_stats":null,"previous_names":["rinpatch/fast_html"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinpatch%2Ffast_html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinpatch%2Ffast_html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinpatch%2Ffast_html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinpatch%2Ffast_html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rinpatch","download_url":"https://codeload.github.com/rinpatch/fast_html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246174539,"owners_count":20735413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","html-parser"],"created_at":"2025-02-04T11:33:37.722Z","updated_at":"2025-03-29T10:47:16.889Z","avatar_url":"https://github.com/rinpatch.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastHTML\n\nA C Node wrapping lexborisov's [myhtml](https://github.com/lexborisov/myhtml).\nPrimarily used with [FastSanitize](https://git.pleroma.social/pleroma/fast_sanitize).\n\n* Available as a hex package: `{:fast_html, \"~\u003e 2.0\"}`\n* [Documentation](https://hexdocs.pm/fast_html/fast_html.html)\n\n## Benchmarks\n\nThe following table provides median times it takes to decode a string to a tree for html parsers that can be used from Elixir. Benchmarks were conducted on a machine with an `AMD Ryzen 9 3950X (32) @ 3.500GHz` CPU and 32GB of RAM. The `mix fast_html.bench` task can be used for running the benchmark by yourself.\n\n| File/Parser          | fast_html (Port) | mochiweb_html (erlang) | html5ever (Rust NIF) | Myhtmlex (NIF)¹ |\n|----------------------|--------------------|------------------------|----------------------|----------------|\n| document-large.html (6.9M)  | 125.12 ms          | 1778.34 ms             | 395.21 ms            | 327.17 ms      |\n| document-medium.html (85K) | 1.93 ms            | 12.10 ms               | 4.74 ms              | 3.82 ms        |\n| document-small.html  (25K)| 0.50 ms            | 2.76 ms                | 1.72 ms              | 1.19 ms        |\n| fragment-large.html  (33K)| 0.93 ms            | 4.78 ms               | 2.34 ms              | 2.15 ms        |\n| fragment-small.html²  (757B)| 44.60 μs | 42.13 μs | 43.58 μs | 289.71 μs |\n\nFull benchmark output can be seen in [this snippet](https://git.pleroma.social/pleroma/elixir-libraries/fast_html/snippets/3128)\n\n1. Myhtmlex has a C-Node mode, but it wasn't benchmarked here because it segfaults on `document-large.html`\n2. The slowdown on `fragment-small.html` is due to Port overhead. Unlike html5ever and Myhtmlex in NIF mode, `fast_html` has the parser process isolated and communicates with it over stdio, so even if a fatal crash in the parser happens, it won't bring down the entire VM.\n\n## Contribution / Bug Reports\n\n* Please make sure you do `git submodule update` after a checkout/pull\n* The project aims to be fully tested\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinpatch%2Ffast_html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frinpatch%2Ffast_html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinpatch%2Ffast_html/lists"}