From b2f324de239441a04a94037c4c25ba675a9aff84 Mon Sep 17 00:00:00 2001 From: itsscb Date: Tue, 3 Sep 2024 13:47:00 +0200 Subject: [PATCH 1/4] feat(frontend): adds performance tweaks --- frontend/Cargo.toml | 5 +++++ frontend/index.html | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index f318717..ed52c28 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -20,3 +20,8 @@ gloo-net = "0.6.0" serde = { version = "1.0.209", features = ["derive"] } serde_json = "1.0.127" rand = "0.8.5" + +[profile.release] +opt-level = "z" +lto = true +strip = true \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 7fdfd91..c1be6a3 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -49,7 +49,11 @@ align-items: center; } - + + + From 19fc694238c85d47da1cdb0227cc1ec0c43a7072 Mon Sep 17 00:00:00 2001 From: itsscb Date: Tue, 3 Sep 2024 13:51:55 +0200 Subject: [PATCH 2/4] fix(frontend): broken stylesheet link --- frontend/index.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index c1be6a3..92243e8 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -49,10 +49,7 @@ align-items: center; } - - + From 37a1e5e9a97139fb60598b8c68b4ad282b0c3cee Mon Sep 17 00:00:00 2001 From: itsscb Date: Tue, 3 Sep 2024 13:57:51 +0200 Subject: [PATCH 3/4] feat(workflow): cache trunk seperately --- .github/workflows/prod.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index f6ff550..06d91cf 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -14,23 +14,31 @@ jobs: - name: checkout uses: actions/checkout@v4 + - name: install rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + + - name: cache trunk + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/trunk + ~/.cache/trunk/ + key: ${{ runner.os }}-cargo-${{ hashFiles('~/.cargo/bin/trunk') }} + restore-keys: ${{ runner.os }}-trunk + - name: cache dependencies uses: actions/cache@v4 with: path: | ~/.cargo/ ~/.cargo/bin/ - ~/.cache/trunk/ target/ node_modules/ key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo-wordl - - - name: install rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - name: add rust target wasm32-unknown-unknown run: rustup target add wasm32-unknown-unknown From 4c8e75387d33e538f98145f58b9fa9ea996f29b8 Mon Sep 17 00:00:00 2001 From: itsscb Date: Tue, 3 Sep 2024 13:58:54 +0200 Subject: [PATCH 4/4] fix(frontend): improves css height --- frontend/src/pages/home.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/home.rs b/frontend/src/pages/home.rs index 3c0abc0..04a3af5 100644 --- a/frontend/src/pages/home.rs +++ b/frontend/src/pages/home.rs @@ -363,7 +363,7 @@ pub fn Home() -> Html { "flex-col", "items-center", "justify-center", - "h-[90vh]", + if *loading { "h-[90vh]" } else { "" }, ) } >