Skip to content

perf(minifier): avoid cloning Cow and allocating Atom#10177

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-02-perf_minifier_avoid_cloning_cow_and_allocating_atom_
Apr 2, 2025
Merged

perf(minifier): avoid cloning Cow and allocating Atom#10177
graphite-app[bot] merged 1 commit intomainfrom
04-02-perf_minifier_avoid_cloning_cow_and_allocating_atom_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Apr 2, 2025

Small optimization to minifier. Avoid cloning a Cow<str>, and don't allocate a new Atom when the string is already in arena.

@github-actions github-actions bot added A-minifier Area - Minifier C-performance Category - Solution not expected to change functional behavior, only performance labels Apr 2, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review April 2, 2025 07:54
@overlookmotel overlookmotel requested a review from Boshen April 2, 2025 07:54
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 2, 2025

CodSpeed Instrumentation Performance Report

Merging #10177 will degrade performances by 3.57%

Comparing 04-02-perf_minifier_avoid_cloning_cow_and_allocating_atom_ (0186383) with main (ec10d94)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 34 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
formatter[antd.js] 7.6 ms 7.9 ms -3.57%
formatter[typescript.js] 7.6 ms 7.2 ms +5.56%

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Apr 2, 2025
Copy link
Member

Boshen commented Apr 2, 2025

Merge activity

Small optimization to minifier. Avoid cloning a `Cow<str>`, and don't allocate a new `Atom` when the string is already in arena.
@graphite-app graphite-app bot force-pushed the 04-02-perf_minifier_avoid_cloning_cow_and_allocating_atom_ branch from e4975d0 to 0186383 Compare April 2, 2025 08:19
@graphite-app graphite-app bot merged commit 0186383 into main Apr 2, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 04-02-perf_minifier_avoid_cloning_cow_and_allocating_atom_ branch April 2, 2025 08:29
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants