Skip to content

Commit

Permalink
Reduce size of examples (#2601)
Browse files Browse the repository at this point in the history
* Reduce size of examples with this one weird trick

* oops, fixup function_router
  • Loading branch information
WorldSEnder committed Apr 11, 2022
1 parent dc60d60 commit daf6ec0
Show file tree
Hide file tree
Showing 23 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/boids/index.html
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<title>Yew • Boids</title>

<link data-trunk rel="rust" />
<link data-trunk rel="sass" href="index.scss" />
</head>

Expand Down
2 changes: 2 additions & 0 deletions examples/contexts/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • Context</title>

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
1 change: 1 addition & 0 deletions examples/counter/index.html
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<title>Yew • Counter</title>

<link data-trunk rel="rust" />
<link data-trunk rel="sass" href="index.scss" />
</head>

Expand Down
1 change: 1 addition & 0 deletions examples/dyn_create_destroy_apps/index.html
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<title>Yew • Create and destroy apps</title>

<link data-trunk rel="rust" />
<link data-trunk rel="sass" href="index.scss" />
</head>

Expand Down
2 changes: 2 additions & 0 deletions examples/file_upload/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • File Upload</title>

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
1 change: 1 addition & 0 deletions examples/function_memory_game/index.html
Expand Up @@ -7,6 +7,7 @@
<title>Yew • Function Memory Game</title>
<base data-trunk-public-url />

<link data-trunk rel="rust" />
<link data-trunk rel="sass" href="scss/index.scss" />
<link data-trunk rel="copy-dir" href="public/" />

Expand Down
2 changes: 2 additions & 0 deletions examples/function_todomvc/index.html
Expand Up @@ -12,6 +12,8 @@
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/todomvc-app-css@2.3.0/index.css"
/>

<link data-trunk rel="rust" />
</head>
<body></body>
</html>
2 changes: 2 additions & 0 deletions examples/futures/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • Futures</title>

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
1 change: 1 addition & 0 deletions examples/game_of_life/index.html
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<title>Yew • Game of Life</title>

<link data-trunk rel="rust" />
<link data-trunk rel="css" href="styles.css" />
<link data-trunk rel="copy-file" href="assets/favicon.ico" />
</head>
Expand Down
2 changes: 2 additions & 0 deletions examples/inner_html/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • Inner HTML</title>

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
1 change: 1 addition & 0 deletions examples/js_callback/index.html
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<title>Yew • Js Callback</title>

<link data-trunk rel="rust" />
<link data-trunk rel="sass" href="index.scss" />
</head>

Expand Down
2 changes: 2 additions & 0 deletions examples/keyed_list/index.html
Expand Up @@ -5,6 +5,8 @@
<title>Yew • Keyed list</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link data-trunk rel="css" href="styles.css" />

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
2 changes: 2 additions & 0 deletions examples/mount_point/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • Mount Point</title>

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
1 change: 1 addition & 0 deletions examples/nested_list/index.html
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<title>Yew • Nested List</title>

<link data-trunk rel="rust" />
<link data-trunk rel="sass" href="styles.scss" />
</head>

Expand Down
2 changes: 2 additions & 0 deletions examples/node_refs/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • Node Refs</title>

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
1 change: 1 addition & 0 deletions examples/password_strength/index.html
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<title>Yew • Password Strength Estimator</title>

<link data-trunk rel="rust" />
<link data-trunk rel="sass" href="index.scss" />
</head>

Expand Down
2 changes: 2 additions & 0 deletions examples/portals/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • Portals</title>

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
2 changes: 2 additions & 0 deletions examples/router/index.html
Expand Up @@ -11,6 +11,8 @@
href="https://cdn.jsdelivr.net/npm/bulma@0.9.0/css/bulma.min.css"
/>
<link data-trunk rel="sass" href="index.scss" />

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
1 change: 1 addition & 0 deletions examples/suspense/index.html
Expand Up @@ -5,6 +5,7 @@
<title>Yew Suspense Demo</title>

<link data-trunk rel="sass" href="index.scss" />
<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
1 change: 1 addition & 0 deletions examples/timer/index.html
Expand Up @@ -6,6 +6,7 @@
<title>Yew • Timer</title>
<link data-trunk rel="scss" href="index.scss"/>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@900&display=swap" rel="stylesheet">
<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down
2 changes: 2 additions & 0 deletions examples/todomvc/index.html
Expand Up @@ -12,6 +12,8 @@
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/todomvc-app-css@2.3.0/index.css"
/>

<link data-trunk rel="rust" />
</head>
<body></body>
</html>
2 changes: 2 additions & 0 deletions examples/two_apps/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • Two Apps</title>

<link data-trunk rel="rust" />
</head>
<body>
<div class="first-app"></div>
Expand Down
2 changes: 2 additions & 0 deletions examples/webgl/index.html
Expand Up @@ -3,6 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Yew • WebGL</title>

<link data-trunk rel="rust" />
</head>

<body></body>
Expand Down

1 comment on commit daf6ec0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yew master branch benchmarks (Lower is better)

Benchmark suite Current: daf6ec0 Previous: 6992a45 Ratio
yew-struct-keyed 01_run1k 156.064 195.059 0.80
yew-struct-keyed 02_replace1k 188.7795 206.788 0.91
yew-struct-keyed 03_update10th1k_x16 315.98850000000004 353.1 0.89
yew-struct-keyed 04_select1k 52.0095 64.42500000000001 0.81
yew-struct-keyed 05_swap1k 75.5505 92.136 0.82
yew-struct-keyed 06_remove-one-1k 25.5745 30.994999999999997 0.83
yew-struct-keyed 07_create10k 2801.632 2367.8995 1.18
yew-struct-keyed 08_create1k-after1k_x2 386.4065 453.057 0.85
yew-struct-keyed 09_clear1k_x8 166.05599999999998 206.0645 0.81
yew-struct-keyed 21_ready-memory 1.457233428955078 1.400554656982422 1.04
yew-struct-keyed 22_run-memory 1.6921310424804688 1.66595458984375 1.02
yew-struct-keyed 23_update5-memory 1.6968612670898438 1.7010345458984375 1.00
yew-struct-keyed 24_run5-memory 1.9441375732421875 1.7096061706542969 1.14
yew-struct-keyed 25_run-clear-memory 1.3270988464355469 1.4214248657226562 0.93
yew-struct-keyed 31_startup-ci 1730.7399999999998 1730.286 1.00
yew-struct-keyed 32_startup-bt 28.756 32.29399999999999 0.89
yew-struct-keyed 33_startup-mainthreadcost 237.664
yew-struct-keyed 34_startup-totalbytes 328.744140625 328.740234375 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.