LibWeb: Throw out decoded UTF-32 data in HTMLTokenizer after parser runs

This ends up saving quite a bit of memory on many pages, since UTF-32
uses 4 bytes per code points.

As an example, it reduces the footprint on https://gymgrossisten.com/
by 2 MiB.
This commit is contained in:
Andreas Kling 2025-10-23 21:45:00 +02:00 committed by Andreas Kling
parent b10f2993b3
commit 3593c3b687
Notes: github-actions[bot] 2025-10-24 06:54:24 +00:00
3 changed files with 18 additions and 0 deletions

View file

@ -259,6 +259,8 @@ void HTMLParser::run(HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point
}
flush_character_insertions();
m_tokenizer.parser_did_run({});
}
void HTMLParser::run(URL::URL const& url, HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point)