Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.11 increased ember-source filesize (~7kb) #18151

Closed
makepanic opened this issue Jun 26, 2019 · 8 comments
Closed

3.11 increased ember-source filesize (~7kb) #18151

makepanic opened this issue Jun 26, 2019 · 8 comments

Comments

@makepanic
Copy link
Contributor

makepanic commented Jun 26, 2019

It seems like 3.11 increased the ember-source dist/ember.min.js size:

version size in bytes
3.10.0 415300
3.11.0 422050
[{
  "3.10.0": {
    "version": "3.10.0",
    "time": "2019-05-13T20:41:53.602Z",
    "size": {
      "raw": 415300,
    }
  },
  "3.11.0-beta.1": {
    "version": "3.11.0-beta.1",
    "time": "2019-05-14T02:37:19.525Z",
    "size": {
      "raw": 421529,
    }
  },
  "3.11.0-beta.2": {
    "version": "3.11.0-beta.2",
    "time": "2019-06-03T20:07:24.587Z",
    "size": {
      "raw": 421564,
    }
  },
  "3.11.0-beta.3": {
    "version": "3.11.0-beta.3",
    "time": "2019-06-11T11:04:23.517Z",
    "size": {
      "raw": 422035,
    }
  },
  "3.11.0-beta.4": {
    "version": "3.11.0-beta.4",
    "time": "2019-06-18T05:53:59.727Z",
    "size": {
      "raw": 422041,
    }
  },
  "3.11.0": {
    "version": "3.11.0",
    "time": "2019-06-25T03:53:05.991Z",
    "size": {
      "raw": 422050,
    }
  }
}]

looks like this when plotted:

20190626-220614

@rwjblue
Copy link
Member

rwjblue commented Jun 26, 2019

Thanks for reporting! Do you happen to have the prod and min+gz sizes handy also?

@rwjblue
Copy link
Member

rwjblue commented Jun 26, 2019

I think next steps here would be to diff the ember.prod.js files between 3.10 and 3.11 so we can see whats going on.

@makepanic
Copy link
Contributor Author

ember.prod.js

20190626-220625

{
  "3.10.2": {
    "version": "3.10.2",
    "time": "2019-06-18T14:06:08.009Z",
    "size": {
      "raw": 1778999,
      "gzip": -1
    }
  },
  "3.11.0-beta.1": {
    "version": "3.11.0-beta.1",
    "time": "2019-05-14T02:37:19.525Z",
    "size": {
      "raw": 1819144,
      "gzip": -1
    }
  },
  "3.11.0-beta.2": {
    "version": "3.11.0-beta.2",
    "time": "2019-06-03T20:07:24.587Z",
    "size": {
      "raw": 1819186,
      "gzip": -1
    }
  },
  "3.11.0-beta.3": {
    "version": "3.11.0-beta.3",
    "time": "2019-06-11T11:04:23.517Z",
    "size": {
      "raw": 1820362,
      "gzip": -1
    }
  },
  "3.11.0-beta.4": {
    "version": "3.11.0-beta.4",
    "time": "2019-06-18T05:53:59.727Z",
    "size": {
      "raw": 1824611,
      "gzip": -1
    }
  },
  "3.11.0": {
    "version": "3.11.0",
    "time": "2019-06-25T03:53:05.991Z",
    "size": {
      "raw": 1824623,
      "gzip": -1
    }
  }
}

@rwjblue
Copy link
Member

rwjblue commented Jun 27, 2019

Just did a quick diff of ember.prod.js between 3.10.1 and 3.11.0, looks like the main issue is that the feature flags aren't being stripped (whoops I was just misreading the diff). Not sure what's up yet, will have to dig in in the morning...)

@rwjblue
Copy link
Member

rwjblue commented Jun 27, 2019

OK, tried to do a better job of reading the diffs. Looks like there are a few categories of things that are making the 3.11 assets larger:

  1. {{on}} and {{fn}} landed for the first time, introducing a decent amount of new code (not a bug per-se)
  1. Some of the support code for tracked properties seems to be present but not guarded in feature flag guards.

Everything else looks pretty good. I think 1) is "fine", but we can definitely do something about 2).

@rwjblue
Copy link
Member

rwjblue commented Jun 28, 2019

Looks like @makepanic has revived and published an updated ember-source size tracker:

I've rebuild the old ember-size-tracker (https://github.com/ilkkao/ember-size-tracker) to use the ember-source npm package and deployed it on github: https://makepanic.github.io/ember-size-tracker/
You can find the source at https://github.com/makepanic/ember-size-tracker

While the size of ember.prod.js has gone up, the size of ember.min.js with gzipping has gone down. If compression still treats us favorably and the "in reality" sizes are lower, I think this is probably a non-issue.

Thoughts?

@makepanic
Copy link
Contributor Author

makepanic commented Jun 29, 2019

the size of ember.min.js with gzipping has gone down

I'm not sure if that's true. From the source:

    "version": "3.10.2",
    "files": [
      {
        "size": {
          "raw": 415690,
          "gzip": 115419
        },
        "name": "package/dist/ember.min.js"
      },
    "version": "3.11.1",
    "files": [
      {
        "size": {
          "raw": 422073,
          "gzip": 117392
        },
        "name": "package/dist/ember.min.js"
      }

both sizes are larger in 3.11.x.

I've updated the graph to also highlight size changes

@locks
Copy link
Contributor

locks commented Apr 19, 2020

Thanks everyone for the discussion. Due to the release schedule, I am closing this and suggest we focus the discussion in #18796, since we seem to have had another regression!

@locks locks closed this as completed Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants