mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 17:16:04 +00:00
LibWeb: Add a workaround for excessive memory usage in Page::load_html
This commit is contained in:
parent
4bdd4beb93
commit
29b12cb449
Notes:
sideshowbarker
2024-07-17 09:37:30 +09:00
Author: https://github.com/ADKaster
Commit: 29b12cb449
Pull-request: https://github.com/SerenityOS/serenity/pull/23910
Reviewed-by: https://github.com/awesomekling
1 changed files with 2 additions and 0 deletions
|
@ -65,6 +65,8 @@ void Page::load(URL::URL const& url)
|
||||||
|
|
||||||
void Page::load_html(StringView html)
|
void Page::load_html(StringView html)
|
||||||
{
|
{
|
||||||
|
// FIXME: #23909 Figure out why GC threshold does not stay low when repeatedly loading html from the WebView
|
||||||
|
heap().collect_garbage();
|
||||||
|
|
||||||
(void)top_level_traversable()->navigate({ .url = "about:srcdoc"sv,
|
(void)top_level_traversable()->navigate({ .url = "about:srcdoc"sv,
|
||||||
.source_document = *top_level_traversable()->active_document(),
|
.source_document = *top_level_traversable()->active_document(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue