glimmerjs / glimmer-vm

MIT License
1.13k stars 191 forks source link

Use terser in dev #1602

Closed NullVoxPopuli closed 2 months ago

NullVoxPopuli commented 3 months ago

See this other PR which has more meaningful size differences: https://github.com/glimmerjs/glimmer-vm/pull/1601


There are a number of flags that are meant to be internal to glimmer-vm and not exposed to ember.js.

There are also flags that are meant to be exposed to ember.js (which are swapped out with DEBUG from '@glimmer/env' during the build)

Output size (using dust)

DevProd
This PR ```bash cd packages/\@glimmer du --ignore_hidden \ --reverse --apparent-size \ --filter ".+\/dist\/dev\/index.js$" \ --no-percent-bars --only-dir --depth 1 647K └─┬ . 175K ├── runtime 168K ├── syntax 104K ├── compiler 63K ├── opcode-compiler 30K ├── debug 23K ├── manager 19K ├── validator 17K ├── util 13K ├── program 8.9K ├── reference 6.0K ├── destroyable 4.5K ├── vm 4.1K ├── node 3.7K ├── global-context 2.5K ├── wire-format 966B ├── encoder 844B ├── vm-babel-plugins 502B └── owner ``` ```bash cd packages/\@glimmer du --ignore_hidden \ --reverse --apparent-size \ --filter ".+\/dist\/prod\/index.js$" \ --no-percent-bars --only-dir --depth 1 301K └─┬ . 79K ├── runtime 74K ├── syntax 50K ├── compiler 25K ├── opcode-compiler 21K ├── debug 11K ├── manager 8.7K ├── util 7.6K ├── validator 5.9K ├── program 4.1K ├── reference 3.0K ├── destroyable 2.8K ├── vm 2.1K ├── node 1.6K ├── wire-format 1.4K ├── global-context 604B ├── encoder 469B ├── vm-babel-plugins 155B └── owner ```
main ```bash cd packages/\@glimmer du --ignore_hidden \ --reverse --apparent-size \ --filter ".+\/dist\/dev\/index.js$" \ --no-percent-bars --only-dir --depth 1 650K └─┬ . 181K ├── runtime 162K ├── syntax 104K ├── compiler 63K ├── opcode-compiler 29K ├── debug 23K ├── manager 19K ├── validator 17K ├── util 13K ├── program 9.5K ├── reference 6.2K ├── destroyable 5.5K ├── global-context 5.0K ├── vm 4.2K ├── node 2.4K ├── wire-format 967B ├── encoder 870B ├── vm-babel-plugins 497B └── owner ``` ```bash cd packages/\@glimmer du --ignore_hidden \ --reverse --apparent-size \ --filter ".+\/dist\/prod\/index.js$" \ --no-percent-bars --only-dir --depth 1 301K └─┬ . 80K ├── runtime 74K ├── syntax 50K ├── compiler 25K ├── opcode-compiler 21K ├── debug 11K ├── manager 8.7K ├── util 7.6K ├── validator 5.9K ├── program 4.1K ├── reference 3.0K ├── destroyable 2.8K ├── vm 2.1K ├── node 1.6K ├── wire-format 1.4K ├── global-context 604B ├── encoder 469B ├── vm-babel-plugins 155B └── owner ```
github-actions[bot] commented 3 months ago

duration phase no difference [-111ms to 95ms] renderEnd phase no difference [-1ms to 2ms] render1000Items1End phase no difference [-11ms to 13ms] clearItems1End phase no difference [-6ms to 2ms] render1000Items2End phase no difference [-14ms to 12ms] clearItems2End phase no difference [-2ms to 4ms] render5000Items1End phase no difference [-38ms to 48ms] clearManyItems1End phase estimated improvement -4ms [-8ms to -1ms] OR -1.51% [-3.1% to -0.28%] render5000Items2End phase no difference [-33ms to 46ms] clearManyItems2End phase estimated improvement -2ms [-5ms to 0ms] OR -0.97% [-2.14% to -0.08%] render1000Items3End phase no difference [-13ms to 16ms] append1000Items1End phase no difference [-20ms to 6ms] append1000Items2End phase no difference [-24ms to 20ms] updateEvery10thItem1End phase no difference [-3ms to 12ms] updateEvery10thItem2End phase no difference [-3ms to 5ms] selectFirstRow1End phase no difference [-1ms to 1ms] selectSecondRow1End phase no difference [-2ms to 0ms] removeFirstRow1End phase no difference [-1ms to 1ms] removeSecondRow1End phase no difference [-2ms to 0ms] swapRows1End phase no difference [0ms to 1ms] swapRows2End phase no difference [-1ms to 0ms] clearItems4End phase no difference [-4ms to 3ms] paint phase no difference [0ms to 0ms]

[23:37:08] Generating Benchmark Reports [started] [23:37:14] Generating Benchmark Reports [completed]

Benchmark Reports    

JSON: /home/runner/work/glimmer-vm/glimmer-vm/tracerbench-results/compare.json

PDF: /home/runner/work/glimmer-vm/glimmer-vm/tracerbench-results/artifact-1.pdf

HTML: /home/runner/work/glimmer-vm/glimmer-vm/tracerbench-results/artifact-1.html