Remove nodejs cargo profile

The cargo profile in the nodejs folder gets ignored because the crate is in a workspace, but it got me thinking about LTO.

Enabling fat LTO more than doubles the build time, and although it shrinks the binary size, if there is a performance impact it's not very obvious (based on sorting in LOOT with the built DLL). On the other hand, thin LTO only only adds a second to the cargo build time and reduced binary size by ~ 1.4 MB, and adding /LTCG on top reduces it by another ~ 1.6 MB. MSVC doesn't output how long linking takes, but it seemed to only add a second or two.
This commit is contained in:
Oliver Hamlet
2025-04-26 16:40:46 +01:00
parent 0bc73f35fe
commit 4cd9b37471
3 changed files with 3 additions and 6 deletions
-4
View File
@@ -16,7 +16,3 @@ napi-derive = "2.12.2"
[build-dependencies]
napi-build = "2.0.1"
[profile.release]
lto = true
strip = "symbols"