Skip to content

Commit 8cfc4da

Browse files
SteffenDEjonatankloskojosevalim
authored
use lazy_html for LiveViewTest (#3746)
* use lazy_html for LiveViewTest Phoenix.LiveView v1.1 will use LazyHTML in its testing infrastructure. Besides featuring a faster HTML parser, LazyHTML has the benefit of keeping the HTML document in memory and converting it to a tree lazily, which allows it to reduce memory allocation (something that can be better exploited by applications that also choose to migrate to LazyHTML in their own suites). Furthermore, it supports additional query selectors and provides a behaviour more aligned to browsers. Using this branch in Livebook reduced the test suite from ~9s to ~7s. Co-Authored-By: Jonatan Kłosko <[email protected]> Co-Authored-By: José Valim <[email protected]> * use published version * properly clear lazy_cache * update single file test script --------- Co-authored-by: Jonatan Kłosko <[email protected]> Co-authored-by: José Valim <[email protected]>
1 parent 7d5578f commit 8cfc4da

File tree

24 files changed

+1507
-1116
lines changed

24 files changed

+1507
-1116
lines changed

.github/single-file-samples/test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Mix.install(
1313
# please test your issue using the latest version of LV from GitHub!
1414
{:phoenix_live_view,
1515
github: "phoenixframework/phoenix_live_view", branch: "main", override: true},
16-
{:floki, ">= 0.30.0"}
16+
{:lazy_html, ">= 0.1.0"}
1717
]
1818
)
1919

0 commit comments

Comments
 (0)