Skip to content

Conversation

@NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Jan 16, 2026

Removes

  • @ember/application/lib/lazy_load
    • exports
      • onLoad, private
      • _loaded, implicit private (internal)
      • runLoadHooks, private
  • ember-testing/lib/initializers
    • imports
      • onLoad from @ember/application/lib/lazy_load
    • exports: none
    • no remaining code in the file once onLoad is removed

Other things I found:

  • Test.registerHelper is a thing -- why? (before we had async testing? or ESM?)
    • app.advanceReadiness() can't be called in here anymore -- which is probably fine.
      • GH search for advance readiness: https://github.com/search?q=advanceReadiness%28%29+-repo%3Aemberjs%2Fember.js&type=code
        • .erb files
        • .coffee files
        • using global App or Ember
      • mostly used in normal-looking code, I suppose, not in a registerHelper
        • most usages look like they in old / unsupported code
        • but a few are used in ways that are supported and advanceReadiness is a public api and still hav a fair number of tests covering its usage

According to the size comment, this PR removes 0.8KB

local bench:

    Benchmark Results Summary    

duration phase no difference [-110ms to 71ms]
renderEnd phase no difference [-3ms to 0ms]
render1000Items1End phase no difference [-13ms to 8ms]
clearItems1End phase no difference [-1ms to 8ms]
render1000Items2End phase no difference [-4ms to 7ms]
clearItems2End phase no difference [0ms to 3ms]
render5000Items1End phase no difference [-29ms to 17ms]
clearManyItems1End phase no difference [-5ms to 2ms]
render5000Items2End phase no difference [-67ms to 0ms]
clearManyItems2End phase no difference [0ms to 1ms]
render1000Items3End phase no difference [0ms to 0ms]
append1000Items1End phase no difference [-17ms to 0ms]
append1000Items2End phase no difference [0ms to 33ms]
updateEvery10thItem1End phase no difference [0ms to 16ms]
updateEvery10thItem2End phase no difference [-1ms to 0ms]
selectFirstRow1End phase no difference [0ms to 0ms]
selectSecondRow1End phase no difference [0ms to 0ms]
removeFirstRow1End phase no difference [0ms to 0ms]
removeSecondRow1End phase no difference [0ms to 0ms]
swapRows1End phase no difference [0ms to 0ms]
swapRows2End phase no difference [0ms to 0ms]
clearItems4End phase no difference [-1ms to 0ms]
paint phase no difference [0ms to 0ms]

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Estimated Asset Sizes

Diff

--- main/out.txt	2026-01-16 20:37:26.000000000 +0000
+++ pr/./pr-21087587728/out.txt	2026-01-17 03:20:12.000000000 +0000
@@ -1,16 +1,16 @@
-╔═══════╤══════════╤══════════╗
-║       │ Min      │ Gzip     ║
-╟───────┼──────────┼──────────╢
-║ Total │ 352.2 KB │ 203.5 KB ║
-╚═══════╧══════════╧══════════╝
+╔═══════╤═══════════╤══════════╗
+║       │ Min       │ Gzip     ║
+╟───────┼───────────┼──────────╢
+║ Total │ 351.43 KB │ 202.8 KB ║
+╚═══════╧═══════════╧══════════╝
 
 ╔══════════════════════╤═══════════╤═══════════╗
 ║ @ember/*             │ Min       │ Gzip      ║
 ╟──────────────────────┼───────────┼───────────╢
-║ Total                │ 313.81 KB │ 181.76 KB ║
+║ Total                │ 313.05 KB │ 181.06 KB ║
 ╟──────────────────────┼───────────┼───────────╢
 ║ -internals           │ 36.61 KB  │ 25.99 KB  ║
-║ application          │ 13.24 KB  │ 7.99 KB   ║
+║ application          │ 12.47 KB  │ 7.29 KB   ║
 ║ array                │ 13.05 KB  │ 7.54 KB   ║
 ║ canary-features      │ 304 B     │ 419 B     ║
 ║ component            │ 2.05 KB   │ 1.61 KB   ║

Details

This PRmain
╔═══════╤═══════════╤══════════╗
║       │ Min       │ Gzip     ║
╟───────┼───────────┼──────────╢
║ Total │ 351.43 KB │ 202.8 KB ║
╚═══════╧═══════════╧══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 313.05 KB │ 181.06 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 36.61 KB  │ 25.99 KB  ║
║ application          │ 12.47 KB  │ 7.29 KB   ║
║ array                │ 13.05 KB  │ 7.54 KB   ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 2.05 KB   │ 1.61 KB   ║
║ controller           │ 1.96 KB   │ 1.45 KB   ║
║ debug                │ 11.73 KB  │ 8.14 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 1.08 KB   │ 802 B     ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
║ modifier             │ 1.22 KB   │ 978 B     ║
║ object               │ 35.98 KB  │ 22.1 KB   ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 630 B     │ 471 B     ║
║ routing              │ 59.37 KB  │ 33.93 KB  ║
║ runloop              │ 2.36 KB   │ 1.5 KB    ║
║ service              │ 1 KB      │ 858 B     ║
║ template             │ 654 B     │ 543 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 123.33 KB │ 59.68 KB  ║
║ template-factory     │ 370 B     │ 351 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 4.11 KB   │ 3.63 KB   ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤══════════╤══════════╗
║ @glimmer/*      │ Min      │ Gzip     ║
╟─────────────────┼──────────┼──────────╢
║ Total           │ 38.38 KB │ 21.74 KB ║
╟─────────────────┼──────────┼──────────╢
║ destroyable     │ 2.78 KB  │ 1.38 KB  ║
║ encoder         │ 81 B     │ 171 B    ║
║ env             │ 38 B     │ 87 B     ║
║ global-context  │ 886 B    │ 545 B    ║
║ manager         │ 977 B    │ 627 B    ║
║ node            │ 175 B    │ 243 B    ║
║ opcode-compiler │ 1.11 KB  │ 905 B    ║
║ owner           │ 159 B    │ 202 B    ║
║ program         │ 252 B    │ 333 B    ║
║ reference       │ 548 B    │ 544 B    ║
║ runtime         │ 10.32 KB │ 5.19 KB  ║
║ tracking        │ 1.34 KB  │ 1.18 KB  ║
║ util            │ 1.94 KB  │ 1.6 KB   ║
║ validator       │ 15.53 KB │ 6.9 KB   ║
║ vm              │ 495 B    │ 569 B    ║
║ wire-format     │ 1.84 KB  │ 1.35 KB  ║
╚═════════════════╧══════════╧══════════╝
╔═══════╤══════════╤══════════╗
║       │ Min      │ Gzip     ║
╟───────┼──────────┼──────────╢
║ Total │ 352.2 KB │ 203.5 KB ║
╚═══════╧══════════╧══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 313.81 KB │ 181.76 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 36.61 KB  │ 25.99 KB  ║
║ application          │ 13.24 KB  │ 7.99 KB   ║
║ array                │ 13.05 KB  │ 7.54 KB   ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 2.05 KB   │ 1.61 KB   ║
║ controller           │ 1.96 KB   │ 1.45 KB   ║
║ debug                │ 11.73 KB  │ 8.14 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 1.08 KB   │ 802 B     ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
║ modifier             │ 1.22 KB   │ 978 B     ║
║ object               │ 35.98 KB  │ 22.1 KB   ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 630 B     │ 471 B     ║
║ routing              │ 59.37 KB  │ 33.93 KB  ║
║ runloop              │ 2.36 KB   │ 1.5 KB    ║
║ service              │ 1 KB      │ 858 B     ║
║ template             │ 654 B     │ 543 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 123.33 KB │ 59.68 KB  ║
║ template-factory     │ 370 B     │ 351 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 4.11 KB   │ 3.63 KB   ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤══════════╤══════════╗
║ @glimmer/*      │ Min      │ Gzip     ║
╟─────────────────┼──────────┼──────────╢
║ Total           │ 38.38 KB │ 21.74 KB ║
╟─────────────────┼──────────┼──────────╢
║ destroyable     │ 2.78 KB  │ 1.38 KB  ║
║ encoder         │ 81 B     │ 171 B    ║
║ env             │ 38 B     │ 87 B     ║
║ global-context  │ 886 B    │ 545 B    ║
║ manager         │ 977 B    │ 627 B    ║
║ node            │ 175 B    │ 243 B    ║
║ opcode-compiler │ 1.11 KB  │ 905 B    ║
║ owner           │ 159 B    │ 202 B    ║
║ program         │ 252 B    │ 333 B    ║
║ reference       │ 548 B    │ 544 B    ║
║ runtime         │ 10.32 KB │ 5.19 KB  ║
║ tracking        │ 1.34 KB  │ 1.18 KB  ║
║ util            │ 1.94 KB  │ 1.6 KB   ║
║ validator       │ 15.53 KB │ 6.9 KB   ║
║ vm              │ 495 B    │ 569 B    ║
║ wire-format     │ 1.84 KB  │ 1.35 KB  ║
╚═════════════════╧══════════╧══════════╝

… even support Test.registerHelper anymore? advanceReadiness is public, so that's annoying
@NullVoxPopuli NullVoxPopuli changed the title Remove '@ember/application's lazy load / onLoad stuff Remove '@ember/application's lazy load / onLoad stuff (private API) Jan 17, 2026
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review January 17, 2026 04:26
@kategengler
Copy link
Member

Test.registerHelper I believe is only vestigial (but I haven't confirmed that we don't call it somewhere) from before we redid ember testing with https://github.com/emberjs/rfcs/blob/main/text/0268-acceptance-testing-refactor.md. Here are the docs from the old-times https://guides.emberjs.com/v2.16.0/testing/acceptance/#toc_custom-test-helpers

This was quite a long time ago and we never deprecated the old style of testing, afaik. BUT, I suspect it does not work at all in even 6.0 or earlier. I think we should see what, if anything of ember-testing is still in use at 6.0.

advanceReadiness and deferReadiness are indeed public APIs that have not been deprecated and I believe they still work. They were commonly called from initializers.

Overall, I think this looks good but I wonder if we should land it with 7.0 just to be safe.

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.

4 participants