* [PATCH datacenter-manager 0/3] ui: reduce compilation time for relase builds
@ 2026-07-06 11:44 Dominik Csapak
2026-07-06 11:44 ` [PATCH datacenter-manager 1/3] ui: d/rules: don't generate debuginfo for the UI Dominik Csapak
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Dominik Csapak @ 2026-07-06 11:44 UTC (permalink / raw)
To: pdm-devel
By sacrificing some space savings:
All three patches save us some time during 'make build' (for per patch
improvements see the individual patches), but 2/3 and 3/3 sacrifice some
space savings.
Note that the numbers in the patches are measured against the baseline
and all three patches together seem to have an even larger effect:
They save us ~250s (-65%) but the file only gets bigger by 2.3 MiB
(+16%) uncompressed, and 420Kib (+10%) compressed.
Not sure if we want to trade binary size by compile time in this way,
but at least the first patch should be a no-brainer since it does not
change the binary size at all.
Aside from these flags, there aren't that many knobs we have in the code
itself to reduce compile time, aside from removing dependencies and
keeping the whole project smaller.
Maybe splitting the pve-api-types into smaller chunks could help (we
only use a small fraction of it in the ui) or replacing some bigger
crates with smaller ones just for the gui (or replacing with browser
native code where possible, maybe base64 and such things?)
Dominik Csapak (3):
ui: d/rules: don't generate debuginfo for the UI
ui: d/rules: use thin instead of fat LTO
ui: d/rules: don't limit compilation to 1 codgen-unit
ui/debian/rules | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH datacenter-manager 1/3] ui: d/rules: don't generate debuginfo for the UI
2026-07-06 11:44 [PATCH datacenter-manager 0/3] ui: reduce compilation time for relase builds Dominik Csapak
@ 2026-07-06 11:44 ` Dominik Csapak
2026-07-07 14:18 ` Fabian Grünbichler
2026-07-06 11:44 ` [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO Dominik Csapak
2026-07-06 11:44 ` [PATCH datacenter-manager 3/3] ui: d/rules: don't limit compilation to 1 codgen-unit Dominik Csapak
2 siblings, 1 reply; 8+ messages in thread
From: Dominik Csapak @ 2026-07-06 11:44 UTC (permalink / raw)
To: pdm-devel
It's built to wasm, which does not have dbgsym so generating these is
just unnecessary waste. Omitting this saves us ~20s per 'make deb' and
should produce identical binaries since wasm-bindgen strips the debug
info anyway.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/debian/rules | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/debian/rules b/ui/debian/rules
index 8a81f126..b3b3b078 100755
--- a/ui/debian/rules
+++ b/ui/debian/rules
@@ -27,12 +27,13 @@ ifneq ($(DEB_DISTRIBUTION),UNRELEASED)
endif
$(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
+ sed -e 's/^debug = true$$/debug = false/g' debian/cargo_home/config.toml
echo "\nlto=\"fat\"" >> debian/cargo_home/config.toml
echo "\nopt-level=\"s\"" >> debian/cargo_home/config.toml
echo "\ncodegen-units=1" >> debian/cargo_home/config.toml
# patch cargo_home config to use lld with wasm, otherwise the build fails
echo "\n[target.wasm32-unknown-unknown]" >> debian/cargo_home/config.toml
- cat debian/cargo_home/config.toml | sed "s/linker=[^']\+/linker=rust-lld/" | grep "^rustflags = " >> debian/cargo_home/config.toml
+ cat debian/cargo_home/config.toml | sed -e "s/linker=[^']\+/linker=rust-lld/" -e "s/'-C', 'debuginfo=[^']*', //g" | grep "^rustflags = " >> debian/cargo_home/config.toml
dh_auto_configure
override_dh_strip:
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH datacenter-manager 1/3] ui: d/rules: don't generate debuginfo for the UI
2026-07-06 11:44 ` [PATCH datacenter-manager 1/3] ui: d/rules: don't generate debuginfo for the UI Dominik Csapak
@ 2026-07-07 14:18 ` Fabian Grünbichler
0 siblings, 0 replies; 8+ messages in thread
From: Fabian Grünbichler @ 2026-07-07 14:18 UTC (permalink / raw)
To: Dominik Csapak, pdm-devel
On July 6, 2026 1:44 pm, Dominik Csapak wrote:
> It's built to wasm, which does not have dbgsym so generating these is
> just unnecessary waste. Omitting this saves us ~20s per 'make deb' and
> should produce identical binaries since wasm-bindgen strips the debug
> info anyway.
it only strips it because we tell it to, right? at some point, we might
want to reconsider and ship a debug variant (and allow loading it via
the API service) to make debugging things easier for users? but I guess
at the moment the debugging story is not too great in general..
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> ui/debian/rules | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ui/debian/rules b/ui/debian/rules
> index 8a81f126..b3b3b078 100755
> --- a/ui/debian/rules
> +++ b/ui/debian/rules
> @@ -27,12 +27,13 @@ ifneq ($(DEB_DISTRIBUTION),UNRELEASED)
> endif
>
> $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
> + sed -e 's/^debug = true$$/debug = false/g' debian/cargo_home/config.toml
> echo "\nlto=\"fat\"" >> debian/cargo_home/config.toml
> echo "\nopt-level=\"s\"" >> debian/cargo_home/config.toml
> echo "\ncodegen-units=1" >> debian/cargo_home/config.toml
> # patch cargo_home config to use lld with wasm, otherwise the build fails
> echo "\n[target.wasm32-unknown-unknown]" >> debian/cargo_home/config.toml
> - cat debian/cargo_home/config.toml | sed "s/linker=[^']\+/linker=rust-lld/" | grep "^rustflags = " >> debian/cargo_home/config.toml
> + cat debian/cargo_home/config.toml | sed -e "s/linker=[^']\+/linker=rust-lld/" -e "s/'-C', 'debuginfo=[^']*', //g" | grep "^rustflags = " >> debian/cargo_home/config.toml
I think this is missing the `strip` part of rustflags here? though I
haven't tested whether it's more effecient to let rustc strip than to
let wasm-bindgen do it later..
> dh_auto_configure
>
> override_dh_strip:
> --
> 2.47.3
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO
2026-07-06 11:44 [PATCH datacenter-manager 0/3] ui: reduce compilation time for relase builds Dominik Csapak
2026-07-06 11:44 ` [PATCH datacenter-manager 1/3] ui: d/rules: don't generate debuginfo for the UI Dominik Csapak
@ 2026-07-06 11:44 ` Dominik Csapak
2026-07-07 14:05 ` Fabian Grünbichler
2026-07-06 11:44 ` [PATCH datacenter-manager 3/3] ui: d/rules: don't limit compilation to 1 codgen-unit Dominik Csapak
2 siblings, 1 reply; 8+ messages in thread
From: Dominik Csapak @ 2026-07-06 11:44 UTC (permalink / raw)
To: pdm-devel
fat LTO merges all LLVM modules into a single unit for optimizing.
Changing this to thin LTO increases the uncompressed binary size by 1.59
MiB (+11%) (compressed +192KiB/+4.6%) but save us ~160s (-40%) of (wall)
build time during a 'make deb'.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/debian/rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/debian/rules b/ui/debian/rules
index b3b3b078..8ffa868a 100755
--- a/ui/debian/rules
+++ b/ui/debian/rules
@@ -28,7 +28,7 @@ endif
$(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
sed -e 's/^debug = true$$/debug = false/g' debian/cargo_home/config.toml
- echo "\nlto=\"fat\"" >> debian/cargo_home/config.toml
+ echo "\nlto=\"thin\"" >> debian/cargo_home/config.toml
echo "\nopt-level=\"s\"" >> debian/cargo_home/config.toml
echo "\ncodegen-units=1" >> debian/cargo_home/config.toml
# patch cargo_home config to use lld with wasm, otherwise the build fails
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO
2026-07-06 11:44 ` [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO Dominik Csapak
@ 2026-07-07 14:05 ` Fabian Grünbichler
2026-07-07 14:10 ` Dominik Csapak
0 siblings, 1 reply; 8+ messages in thread
From: Fabian Grünbichler @ 2026-07-07 14:05 UTC (permalink / raw)
To: Dominik Csapak, pdm-devel
On July 6, 2026 1:44 pm, Dominik Csapak wrote:
> fat LTO merges all LLVM modules into a single unit for optimizing.
> Changing this to thin LTO increases the uncompressed binary size by 1.59
> MiB (+11%) (compressed +192KiB/+4.6%) but save us ~160s (-40%) of (wall)
> build time during a 'make deb'.
but what are the effects on runtime performance? the same question also
applies to the next patch, a single codegen unit increases the amount of
optimizations the compiler can do..
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> ui/debian/rules | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/debian/rules b/ui/debian/rules
> index b3b3b078..8ffa868a 100755
> --- a/ui/debian/rules
> +++ b/ui/debian/rules
> @@ -28,7 +28,7 @@ endif
>
> $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
> sed -e 's/^debug = true$$/debug = false/g' debian/cargo_home/config.toml
> - echo "\nlto=\"fat\"" >> debian/cargo_home/config.toml
> + echo "\nlto=\"thin\"" >> debian/cargo_home/config.toml
> echo "\nopt-level=\"s\"" >> debian/cargo_home/config.toml
> echo "\ncodegen-units=1" >> debian/cargo_home/config.toml
> # patch cargo_home config to use lld with wasm, otherwise the build fails
> --
> 2.47.3
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO
2026-07-07 14:05 ` Fabian Grünbichler
@ 2026-07-07 14:10 ` Dominik Csapak
2026-07-07 14:51 ` Fabian Grünbichler
0 siblings, 1 reply; 8+ messages in thread
From: Dominik Csapak @ 2026-07-07 14:10 UTC (permalink / raw)
To: Fabian Grünbichler, pdm-devel
On 7/7/26 4:05 PM, Fabian Grünbichler wrote:
> On July 6, 2026 1:44 pm, Dominik Csapak wrote:
>> fat LTO merges all LLVM modules into a single unit for optimizing.
>> Changing this to thin LTO increases the uncompressed binary size by 1.59
>> MiB (+11%) (compressed +192KiB/+4.6%) but save us ~160s (-40%) of (wall)
>> build time during a 'make deb'.
>
> but what are the effects on runtime performance? the same question also
> applies to the next patch, a single codegen unit increases the amount of
> optimizations the compiler can do..
true, i didn't measure that. I'll see that i can come up with some
sensible gui benchmark to measure this and I'll report back
with the numbers..
>
>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>> ---
>> ui/debian/rules | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ui/debian/rules b/ui/debian/rules
>> index b3b3b078..8ffa868a 100755
>> --- a/ui/debian/rules
>> +++ b/ui/debian/rules
>> @@ -28,7 +28,7 @@ endif
>>
>> $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
>> sed -e 's/^debug = true$$/debug = false/g' debian/cargo_home/config.toml
>> - echo "\nlto=\"fat\"" >> debian/cargo_home/config.toml
>> + echo "\nlto=\"thin\"" >> debian/cargo_home/config.toml
>> echo "\nopt-level=\"s\"" >> debian/cargo_home/config.toml
>> echo "\ncodegen-units=1" >> debian/cargo_home/config.toml
>> # patch cargo_home config to use lld with wasm, otherwise the build fails
>> --
>> 2.47.3
>>
>>
>>
>>
>>
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO
2026-07-07 14:10 ` Dominik Csapak
@ 2026-07-07 14:51 ` Fabian Grünbichler
0 siblings, 0 replies; 8+ messages in thread
From: Fabian Grünbichler @ 2026-07-07 14:51 UTC (permalink / raw)
To: Dominik Csapak, pdm-devel
On July 7, 2026 4:10 pm, Dominik Csapak wrote:
>
>
> On 7/7/26 4:05 PM, Fabian Grünbichler wrote:
>> On July 6, 2026 1:44 pm, Dominik Csapak wrote:
>>> fat LTO merges all LLVM modules into a single unit for optimizing.
>>> Changing this to thin LTO increases the uncompressed binary size by 1.59
>>> MiB (+11%) (compressed +192KiB/+4.6%) but save us ~160s (-40%) of (wall)
>>> build time during a 'make deb'.
>>
>> but what are the effects on runtime performance? the same question also
>> applies to the next patch, a single codegen unit increases the amount of
>> optimizations the compiler can do..
>
>
> true, i didn't measure that. I'll see that i can come up with some
> sensible gui benchmark to measure this and I'll report back
> with the numbers..
and for completeness' sake - one way to solve this would be to split the
"release" build from a "fast" build (by putting one of them behind a
build profile). then the fast build could use thin LTO and multiple
codegen units, and the regular release build could still be optimized
for size and runtime speed (while taking longer to complete).
the "fast" build would then mainly be a final gate before submitting
patches, since most development will happen via trunk anyway..
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH datacenter-manager 3/3] ui: d/rules: don't limit compilation to 1 codgen-unit
2026-07-06 11:44 [PATCH datacenter-manager 0/3] ui: reduce compilation time for relase builds Dominik Csapak
2026-07-06 11:44 ` [PATCH datacenter-manager 1/3] ui: d/rules: don't generate debuginfo for the UI Dominik Csapak
2026-07-06 11:44 ` [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO Dominik Csapak
@ 2026-07-06 11:44 ` Dominik Csapak
2 siblings, 0 replies; 8+ messages in thread
From: Dominik Csapak @ 2026-07-06 11:44 UTC (permalink / raw)
To: pdm-devel
This makes the compilation of big crates (pdm-ui/proxmox-yew-comp/etc.)
much slower. By removing this, the compiled file grows by ~484 KiB (+3%)
(+156KiB/+3.7% compressed) but we save ~34s of compile time (-9%).
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/debian/rules | 1 -
1 file changed, 1 deletion(-)
diff --git a/ui/debian/rules b/ui/debian/rules
index 8ffa868a..a4d0fa0f 100755
--- a/ui/debian/rules
+++ b/ui/debian/rules
@@ -30,7 +30,6 @@ endif
sed -e 's/^debug = true$$/debug = false/g' debian/cargo_home/config.toml
echo "\nlto=\"thin\"" >> debian/cargo_home/config.toml
echo "\nopt-level=\"s\"" >> debian/cargo_home/config.toml
- echo "\ncodegen-units=1" >> debian/cargo_home/config.toml
# patch cargo_home config to use lld with wasm, otherwise the build fails
echo "\n[target.wasm32-unknown-unknown]" >> debian/cargo_home/config.toml
cat debian/cargo_home/config.toml | sed -e "s/linker=[^']\+/linker=rust-lld/" -e "s/'-C', 'debuginfo=[^']*', //g" | grep "^rustflags = " >> debian/cargo_home/config.toml
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-07-07 14:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 11:44 [PATCH datacenter-manager 0/3] ui: reduce compilation time for relase builds Dominik Csapak
2026-07-06 11:44 ` [PATCH datacenter-manager 1/3] ui: d/rules: don't generate debuginfo for the UI Dominik Csapak
2026-07-07 14:18 ` Fabian Grünbichler
2026-07-06 11:44 ` [PATCH datacenter-manager 2/3] ui: d/rules: use thin instead of fat LTO Dominik Csapak
2026-07-07 14:05 ` Fabian Grünbichler
2026-07-07 14:10 ` Dominik Csapak
2026-07-07 14:51 ` Fabian Grünbichler
2026-07-06 11:44 ` [PATCH datacenter-manager 3/3] ui: d/rules: don't limit compilation to 1 codgen-unit Dominik Csapak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.