-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(html/minifier): Add
remove_redundant_attributes
(#5023)
- Loading branch information
1 parent
c7c1f63
commit 03d8a3a
Showing
5 changed files
with
44 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...wc_html_minifier/tests/fixture/attribute/disabled-remove_redundant_attributes/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"removeRedundantAttributes": false | ||
} |
15 changes: 15 additions & 0 deletions
15
...swc_html_minifier/tests/fixture/attribute/disabled-remove_redundant_attributes/input.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="a.css"> | ||
<link rel="stylesheet" href="b.css" type="text/css"> | ||
<link rel="stylesheet" href="b.css" type="TEXT/CSS"> | ||
<link rel="stylesheet" href="c.css" type=" text/css "> | ||
<link rel="stylesheet" href="d.css" type=""> | ||
<link rel="stylesheet" href="d.css" type="unknown/unknown"> | ||
</head> | ||
<body> | ||
<div>test</div> | ||
</body> | ||
</html> |
3 changes: 3 additions & 0 deletions
3
...tml_minifier/tests/fixture/attribute/disabled-remove_redundant_attributes/output.min.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!doctype html><html lang=en><title>Document</title><link rel=stylesheet href=a.css><link rel=stylesheet href=b.css type=text/css><link rel=stylesheet href=b.css type=TEXT/CSS><link rel=stylesheet href=c.css type=" text/css "><link rel=stylesheet href=d.css type=""><link rel=stylesheet href=d.css type=unknown/unknown><body> | ||
<div>test</div> | ||
|
03d8a3a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/minify/libraries/antd
1618146525
ns/iter (± 7702654
)1731841746
ns/iter (± 45495392
)0.93
es/full/minify/libraries/d3
406834710
ns/iter (± 5405047
)443157766
ns/iter (± 7411315
)0.92
es/full/minify/libraries/echarts
1598170809
ns/iter (± 14541989
)1732131313
ns/iter (± 37519704
)0.92
es/full/minify/libraries/jquery
89103878
ns/iter (± 1302569
)115781881
ns/iter (± 7588106
)0.77
es/full/minify/libraries/lodash
117746226
ns/iter (± 2346764
)145730217
ns/iter (± 4393504
)0.81
es/full/minify/libraries/moment
51564244
ns/iter (± 442836
)65768042
ns/iter (± 3557495
)0.78
es/full/minify/libraries/react
17305172
ns/iter (± 822995
)19936016
ns/iter (± 359616
)0.87
es/full/minify/libraries/terser
595203232
ns/iter (± 12893118
)633708367
ns/iter (± 15582042
)0.94
es/full/minify/libraries/three
540731385
ns/iter (± 6533171
)574230452
ns/iter (± 8732932
)0.94
es/full/minify/libraries/typescript
3457193911
ns/iter (± 34914285
)3682627601
ns/iter (± 54453633
)0.94
es/full/minify/libraries/victory
727574988
ns/iter (± 14087175
)779569075
ns/iter (± 14570329
)0.93
es/full/minify/libraries/vue
144490205
ns/iter (± 1806348
)170539456
ns/iter (± 9833634
)0.85
es/full/codegen/es3
32588
ns/iter (± 779
)33161
ns/iter (± 2009
)0.98
es/full/codegen/es5
32642
ns/iter (± 817
)33423
ns/iter (± 1946
)0.98
es/full/codegen/es2015
32932
ns/iter (± 794
)33013
ns/iter (± 2267
)1.00
es/full/codegen/es2016
32807
ns/iter (± 1466
)33225
ns/iter (± 2309
)0.99
es/full/codegen/es2017
32936
ns/iter (± 444
)33027
ns/iter (± 1114
)1.00
es/full/codegen/es2018
32910
ns/iter (± 622
)32579
ns/iter (± 797
)1.01
es/full/codegen/es2019
33254
ns/iter (± 792
)33386
ns/iter (± 3306
)1.00
es/full/codegen/es2020
32859
ns/iter (± 858
)33126
ns/iter (± 1758
)0.99
es/full/all/es3
183492790
ns/iter (± 8578683
)186893916
ns/iter (± 13577607
)0.98
es/full/all/es5
175076108
ns/iter (± 5277015
)200373672
ns/iter (± 17765138
)0.87
es/full/all/es2015
139171315
ns/iter (± 3765043
)146090867
ns/iter (± 15504210
)0.95
es/full/all/es2016
137326056
ns/iter (± 6764531
)140405064
ns/iter (± 4947429
)0.98
es/full/all/es2017
136490061
ns/iter (± 2282006
)140360398
ns/iter (± 4328503
)0.97
es/full/all/es2018
138268333
ns/iter (± 2977881
)141148328
ns/iter (± 6755038
)0.98
es/full/all/es2019
140918798
ns/iter (± 3433998
)137526347
ns/iter (± 3289707
)1.02
es/full/all/es2020
134618863
ns/iter (± 3283732
)132345338
ns/iter (± 4685046
)1.02
es/full/parser
713521
ns/iter (± 13013
)730611
ns/iter (± 31528
)0.98
es/full/base/fixer
29384
ns/iter (± 558
)30152
ns/iter (± 1444
)0.97
es/full/base/resolver_and_hygiene
87686
ns/iter (± 3628
)90687
ns/iter (± 9704
)0.97
serialization of ast node
207
ns/iter (± 4
)212
ns/iter (± 5
)0.98
serialization of serde
219
ns/iter (± 1
)223
ns/iter (± 13
)0.98
This comment was automatically generated by workflow using github-action-benchmark.