Skip to content

Conversation

@7086cmd
Copy link
Contributor

@7086cmd 7086cmd commented Oct 3, 2024

Seems that the gzip is so metaphysical... I don't know why it enlarges the gzipped size.

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 3, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

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

Copy link
Contributor Author

7086cmd commented Oct 3, 2024


// Try it out with properties and methods
fold("function f(){if(x){a.b=1}}", "function f(){if(x)a.b=1}");
fold("function f(){if(x){a.b=1}}", "function f(){x&&(a.b=1)}");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

REPL here.

Comment on lines +201 to +206
// fold("function f(){if(x){if(y)foo();else bar()}}", "function f(){x&&(y?foo():bar())}");
// fold("function f(){if(x){if(y)foo()}else bar()}", "function f(){x?y&&foo():bar()}");
// fold(
// "function f(){if(x){if(y)foo();else bar()}else{baz()}}",
// "function f(){x?y?foo():bar():baz()}",
// );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently I didn't support handling the BlockStatement.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 3, 2024

CodSpeed Performance Report

Merging #6266 will degrade performances by 42.89%

Comparing 10-03-feat_minifier_compress_single_consequence_if_statement (d507f18) with main (37cbabb)

Summary

❌ 2 regressions
✅ 27 untouched benchmarks

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

Benchmarks breakdown

Benchmark main 10-03-feat_minifier_compress_single_consequence_if_statement Change
minifier[antd.js] 347 ms 441.7 ms -21.44%
minifier[typescript.js] 449 ms 786.2 ms -42.89%

@Boshen Boshen changed the base branch from 10-03-fix_minifier_should_not_handle_the_strict_operation_for_bool_comparison to graphite-base/6266 October 3, 2024 12:16
@Boshen Boshen force-pushed the 10-03-feat_minifier_compress_single_consequence_if_statement branch from 6a0825b to f1f0819 Compare October 3, 2024 12:23
@Boshen Boshen force-pushed the graphite-base/6266 branch from e4fcd01 to 37cbabb Compare October 3, 2024 12:23
@Boshen Boshen changed the base branch from graphite-base/6266 to main October 3, 2024 12:24
@Boshen Boshen force-pushed the 10-03-feat_minifier_compress_single_consequence_if_statement branch from f1f0819 to d507f18 Compare October 3, 2024 12:24
@7086cmd
Copy link
Contributor Author

7086cmd commented Oct 14, 2024

Stale. Maybe we can find a better way to handle this.

@7086cmd 7086cmd closed this Oct 14, 2024
@Boshen Boshen deleted the 10-03-feat_minifier_compress_single_consequence_if_statement branch November 20, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants