Skip to content

Add minimal Optimizer Transformer Config#1180

Merged
sebastianbenz merged 4 commits intomainfrom
optimizer-benchmark
Mar 30, 2021
Merged

Add minimal Optimizer Transformer Config#1180
sebastianbenz merged 4 commits intomainfrom
optimizer-benchmark

Conversation

@sebastianbenz
Copy link
Copy Markdown
Collaborator

  • Implement a minimal transformer config executing only essential
    transformations.
  • Add a benchmark comparing both versions

Results:

minimal x 147 ops/sec ±38.65% (72 runs sampled) 6.816074326178452ms
default x 6.93 ops/sec ±11.41% (40 runs sampled) 144.290958325ms
Fastest is minimal

* Implement a minimal transformer config executing only essential
  transformations.
* Add a benchmark comparing both versions

Results:

```
minimal x 147 ops/sec ±38.65% (72 runs sampled) 6.816074326178452ms
default x 6.93 ops/sec ±11.41% (40 runs sampled) 144.290958325ms
Fastest is minimal
```
@sebastianbenz
Copy link
Copy Markdown
Collaborator Author

Traced the individual transformer execution times:

AddMandatoryTags: 0.465ms
Markdown: 0.055ms
AutoExtensionImporter: 68.673ms
OptimizeImages: 0.059ms
OptimizeHeroImage: 1.654ms
OptimizeAmpBind: 0.071ms
ServerSideRendering: 3.025ms
AmpBoilerplateTransformer: 0.116ms
ReorderHeadTransformer: 0.429ms
RewriteAmpUrls: 0.497ms
GoogleFontsPreconnect: 0.107ms
PruneDuplicateResourceHints: 0.165ms
AddBlurryImagePlaceholders: 0.085ms
SeparateKeyframes: 317.038ms
AddTransformedFlag: 0.042ms
MinifyHtml: 6.029ms
AmpScriptCsp: 0.631ms

Maybe we should get rid of SeparateKeyframes...since we've raised the CSS limit it's less of a concern.

@sebastianbenz sebastianbenz merged commit dea5b9a into main Mar 30, 2021
@sebastianbenz sebastianbenz deleted the optimizer-benchmark branch March 30, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant