Skip to content

Commit b4ead2f

Browse files
authored
Merge pull request #10640 from gitbutlerapp/publishing-performance
publishing performance
2 parents 903cb2d + 54db827 commit b4ead2f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.github/workflows/publish.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ jobs:
134134
- uses: actions/checkout@v5
135135
with:
136136
token: ${{ secrets.PAT_JUNON }} # custom token here so that we can push tags later
137+
- name: Rust Cache
138+
uses: Swatinem/[email protected]
139+
with:
140+
shared-key: app-release-build
137141
- name: Init Node Environment
138142
uses: ./.github/actions/init-env-node
139143

@@ -183,6 +187,7 @@ jobs:
183187
gir1.2-webkit2-4.1=2.44.0-2;
184188
185189
- uses: actions/download-artifact@v5
190+
name: Download SvelteKit build output
186191
with:
187192
name: sveltekit-build
188193
path: ./apps/desktop/build/

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ rmcp = { version = "0.1.5" }
100100
serde_json_lenient = "0.2.3"
101101

102102
[profile.release]
103-
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
104-
lto = true # Enables link to optimizations
103+
lto = "thin" # Enables link to optimizations, but don't go all out on compile time.
105104
opt-level = "s" # Optimize for binary size
106105

107106
[profile.bench]

crates/gitbutler-project/src/project.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,12 @@ impl Project {
126126
// nexted insided of another via a gitignored folder.
127127
// We want to match on the longest project path.
128128
projects.sort_by(|a, b| {
129-
b.path
130-
.to_string_lossy()
129+
a.path
130+
.as_os_str()
131131
.len()
132-
.cmp(&a.path.to_string_lossy().len())
132+
.cmp(&b.path.as_os_str().len())
133+
// longest first
134+
.reverse()
133135
});
134136
let resolved_path = if path.is_relative() {
135137
path.canonicalize().context("Failed to canonicalize path")?

0 commit comments

Comments
 (0)