diff --git a/crates/oxc_minifier/src/peephole/minimize_statements.rs b/crates/oxc_minifier/src/peephole/minimize_statements.rs index 45d27d79a5..e4c0cffb90 100644 --- a/crates/oxc_minifier/src/peephole/minimize_statements.rs +++ b/crates/oxc_minifier/src/peephole/minimize_statements.rs @@ -619,8 +619,8 @@ impl<'a> PeepholeOptimizations { Self::try_minimize_if(&mut if_stmt, ctx).unwrap_or_else(|| { Statement::IfStatement(ArenaBox::new_in(if_stmt, ctx)) }); - result.push(if_stmt); ctx.notice_change(); + Self::minimize_statement(if_stmt, stmts, result, ctx); return; } } diff --git a/tasks/track_memory_allocations/allocs_minifier.yaml b/tasks/track_memory_allocations/allocs_minifier.yaml index 3121b228d4..aa223f6807 100644 --- a/tasks/track_memory_allocations/allocs_minifier.yaml +++ b/tasks/track_memory_allocations/allocs_minifier.yaml @@ -1,13 +1,13 @@ checker.ts: file size: 2922154 # 2.92 MB - sys allocs: 150 + sys allocs: 122 sys reallocs: 5 - sys deallocs: 150 + sys deallocs: 122 sys alloc bytes: 14996632 # 15.00 MB sys peak growth: 10169560 # 10.17 MB - arena allocs: 72024 - arena reallocs: 28269 - arena size: 17401952 # 17.40 MB + arena allocs: 59908 + arena reallocs: 21415 + arena size: 16569784 # 16.57 MB App.tsx: file size: 415342 # 415.34 kB @@ -71,6 +71,6 @@ kitchen-sink.tsx: sys deallocs: 1854 sys alloc bytes: 5304692 # 5.30 MB sys peak growth: 3707457 # 3.71 MB - arena allocs: 31992 - arena reallocs: 12187 + arena allocs: 31993 + arena reallocs: 12186 arena size: 8689832 # 8.69 MB