Skip to content

Commit c1e1c7d

Browse files
cleanup; don't depend on Leaf if we don't test it (reducing build times) and...
- update benchmark pngs to reflect Elementary implementation changes
1 parent e4e05f7 commit c1e1c7d

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

Benchmarks/Benchmarks/Elementary/Elementary.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ package struct ElementaryTests : HTMLGenerator {
2020
}
2121
}
2222

23-
struct StaticView: HTML {
24-
var content: some HTML {
23+
struct StaticView : HTML {
24+
var content : some HTML {
2525
HTMLRaw("<!DOCTYPE html>")
2626
html {
2727
head {
@@ -34,10 +34,9 @@ struct StaticView: HTML {
3434
}
3535
}
3636

37-
struct DynamicView: HTML {
37+
struct DynamicView : HTML {
3838
let context:HTMLContext
39-
40-
// Elementary puts the title element first in the head, which is wrong; it needs to be charset | this is a workaround
39+
4140
var content : some HTML {
4241
HTMLRaw("<!DOCTYPE html>")
4342
html {

Benchmarks/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let package = Package(
2424
.package(url: "https://github.com/RandomHashTags/fork-swift-dom", branch: "master"),
2525
//.package(url: "https://github.com/TokamakUI/Tokamak", from: "0.11.1"), // swift-benchmark problem
2626

27-
.package(url: "https://github.com/vapor/leaf", exact: "4.4.0"),
27+
//.package(url: "https://github.com/vapor/leaf", exact: "4.4.0"), // tight integration with Vapor
2828

2929
// networking
3030
.package(url: "https://github.com/apple/swift-nio", from: "2.75.0"),
@@ -51,7 +51,7 @@ let package = Package(
5151
name: "TestLeaf",
5252
dependencies: [
5353
"Utilities",
54-
.product(name: "Leaf", package: "Leaf")
54+
//.product(name: "Leaf", package: "Leaf")
5555
],
5656
path: "Benchmarks/Leaf"
5757
),

Benchmarks/img/throughput_dynamic.png

-110 Bytes
Loading

Benchmarks/img/throughput_static.png

-1.07 KB
Loading

0 commit comments

Comments
 (0)