Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: build denort with panic = "abort" for releases #27507

Merged
merged 8 commits into from
Dec 31, 2024

Conversation

nathanwhit
Copy link
Member

@nathanwhit nathanwhit commented Dec 30, 2024

This PR changes CI to build denort with a separate, new build profile release-slim that disables unwinding and strips symbols. This reduces the size of denort by about 10%

current denort:

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  58.1%  39.3Mi  57.9%  39.3Mi    __TEXT,__text
  31.5%  21.3Mi  31.4%  21.3Mi    __TEXT,__const
   2.5%  1.68Mi   2.5%  1.68Mi    __DATA_CONST,__const
   2.4%  1.62Mi   2.4%  1.62Mi    __TEXT,__eh_frame
   2.4%  1.60Mi   2.4%  1.60Mi    __TEXT,__gcc_except_tab
   0.9%   610Ki   0.9%   610Ki    __TEXT,__cstring
   0.8%   536Ki   0.8%   536Ki    Code Signature
   0.7%   507Ki   0.7%   507Ki    __TEXT,__unwind_info
   0.3%   207Ki   0.3%   207Ki    Function Start Addresses
   0.2%   165Ki   0.2%   165Ki    __DATA,__data
   0.0%       0   0.2%   153Ki    __DATA,__bss
   0.1%  51.0Ki   0.1%  51.0Ki    Rebase Info
   0.1%  45.3Ki   0.1%  45.3Ki    __TEXT,__literals
   0.0%  31.4Ki   0.1%  36.8Ki    [15 Others]
   0.0%  25.6Ki   0.0%  25.7Ki    [__TEXT]
   0.0%  19.3Ki   0.0%  20.2Ki    [__DATA]
   0.0%  8.11Ki   0.0%  8.11Ki    Lazy Binding Info
   0.0%       8   0.0%  8.08Ki    [__LINKEDIT]
   0.0%  6.84Ki   0.0%  6.84Ki    Symbol Table
   0.0%  5.55Ki   0.0%  5.55Ki    String Table
   0.0%  5.53Ki   0.0%  5.53Ki    __TEXT,__ustring
 100.0%  67.6Mi 100.0%  67.8Mi    TOTAL

built with this PR:

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  59.6%  36.6Mi  59.5%  36.6Mi    __TEXT,__text
  34.6%  21.3Mi  34.5%  21.3Mi    __TEXT,__const
   2.7%  1.68Mi   2.7%  1.68Mi    __DATA_CONST,__const
   1.0%   610Ki   1.0%   610Ki    __TEXT,__cstring
   0.8%   487Ki   0.8%   487Ki    Code Signature
   0.3%   193Ki   0.3%   193Ki    Function Start Addresses
   0.3%   165Ki   0.3%   165Ki    __DATA,__data
   0.0%       0   0.2%   153Ki    __DATA,__bss
   0.2%   152Ki   0.2%   152Ki    __TEXT,__unwind_info
   0.1%  69.5Ki   0.1%  69.5Ki    __TEXT,__eh_frame
   0.1%  50.9Ki   0.1%  50.9Ki    Rebase Info
   0.1%  45.3Ki   0.1%  45.3Ki    __TEXT,__literals
   0.1%  34.1Ki   0.1%  39.5Ki    [15 Others]
   0.0%  19.3Ki   0.0%  20.2Ki    [__DATA]
   0.0%  19.6Ki   0.0%  19.7Ki    [__TEXT]
   0.0%  16.6Ki   0.0%  16.6Ki    __TEXT,__gcc_except_tab
   0.0%  8.09Ki   0.0%  8.09Ki    Lazy Binding Info
   0.0%       8   0.0%  7.69Ki    [__LINKEDIT]
   0.0%  6.83Ki   0.0%  6.83Ki    Symbol Table
   0.0%  5.77Ki   0.0%  5.77Ki    [__DATA_CONST]
   0.0%  5.53Ki   0.0%  5.53Ki    __TEXT,__ustring
 100.0%  61.4Mi 100.0%  61.6Mi    TOTAL

A caveat is that this will increase release build times in CI since it requires building twice - once with unwinding and once without

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, let's land it and evaluate it on main.

@nathanwhit nathanwhit merged commit 2965413 into denoland:main Dec 31, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants