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

Svelted some our builds a bit (3KB savings) #4920

Merged
merged 1 commit into from
Apr 13, 2017

Conversation

runspired
Copy link
Contributor

This takes current master's addon/ modules from 160.04KB and 84 modules in prod to 157.01 KB and 79 modules

It also adds the script lib/analyze-modules.js that can be used for a granular breakdown of the ember-data modules in a minified production version of vendor.js

Example:

Processing ember-data modules from: dist/assets/vendor-601321e0c286e71176ce7910ad0436e4.js


Ember Data Asset Size Report
================================================
	Total: 157.01 KB
	Modules: 79
================================================
15.14 KB	9.6 %	ember-data/-private/system/store
14.47 KB	9.2 %	ember-data/-private/system/model/internal-model
 9.51 KB	6.1 %	ember-data/adapters/rest
 8.67 KB	5.5 %	ember-data/serializers/json
 6.92 KB	4.4 %	ember-data/-private/system/model/model
 5.87 KB	3.7 %	ember-data/-private/system/model/states
 5.71 KB	3.6 %	ember-data/-private/system/relationships/state/relationship
 5.61 KB	3.6 %	ember-data/serializers/json-api
 5.51 KB	3.5 %	ember-data/-private/system/relationships/state/has-many
 4.77 KB	3.0 %	ember-data/serializers/rest
 4.53 KB	2.9 %	ember-data/-private/system/record-array-manager
 4.52 KB	2.9 %	ember-data/serializers/embedded-records-mixin
 3.96 KB	2.5 %	ember-data/-private/system/relationships/state/belongs-to
 3.47 KB	2.2 %	ember-data/-private/system/store/finders
 3.36 KB	2.1 %	ember-data/index
 2.97 KB	1.9 %	ember-data/-private/system/snapshot
 2.81 KB	1.8 %	ember-data/-private/system/relationships/relationship-payloads
 2.32 KB	1.5 %	ember-data/-private/system/many-array
 2.13 KB	1.4 %	ember-data/-private/system/record-arrays/record-array
 2.02 KB	1.3 %	ember-data/-private/system/references/has-many
 1.99 KB	1.3 %	ember-data/adapters/errors
 1.95 KB	1.2 %	ember-data/-private/system/model/errors
 1.95 KB	1.2 %	ember-data/adapters/json-api
 1.91 KB	1.2 %	ember-data/-private/adapters/build-url-mixin
 1.86 KB	1.2 %	ember-data/-private/system/debug/debug-adapter
 1.57 KB	1.0 %	ember-data/-private/system/internal-model-map
 1.55 KB	1.0 %	ember-data/-private/system/references/belongs-to
 1.38 KB	0.9 %	ember-data/-private/system/relationships/relationship-payloads-manager
 1.35 KB	0.9 %	ember-data/-private/system/store/container-instance-cache
 1.34 KB	0.9 %	ember-data/-private/system/store/serializer-response
 1.26 KB	0.8 %	ember-data/-private/system/relationships/state/create
 1.26 KB	0.8 %	ember-data/-private/system/relationships/ext
 1.13 KB	0.7 %	ember-data/-private/system/relationships/belongs-to
 1.12 KB	0.7 %	ember-data/attr
   980 B	0.6 %	ember-data/-private/system/relationships/has-many
   962 B	0.6 %	ember-data/-private/system/record-arrays/adapter-populated-record-array
   955 B	0.6 %	ember-data/-private/system/promise-proxies
   915 B	0.6 %	ember-data/-private/system/snapshot-record-array
   887 B	0.6 %	ember-data/-private/system/references/record
   813 B	0.5 %	ember-data/-private/initializers/store
   774 B	0.5 %	ember-data/-private/system/record-arrays/filtered-record-array
   771 B	0.5 %	ember-data/-private/ext/date
   692 B	0.4 %	ember-data/-private/global
   678 B	0.4 %	ember-data/-private/transforms/boolean
   669 B	0.4 %	ember-data/-private/transforms/date
   655 B	0.4 %	ember-data/adapter
   638 B	0.4 %	ember-data/-private/utils
   554 B	0.3 %	ember-data/-private/system/ordered-set
   543 B	0.3 %	ember-data/-private/transforms
   508 B	0.3 %	ember-data/-private/system/record-arrays
   505 B	0.3 %	ember-data/-private/system/relationship-meta
   500 B	0.3 %	ember-data/-private/instance-initializers/initialize-store-service
   491 B	0.3 %	ember-data/-private/system/store/common
   474 B	0.3 %	ember-data/-private/system/identity-map
   471 B	0.3 %	ember-data/-private/system/normalize-link
   444 B	0.3 %	ember-data/-private/utils/parse-response-headers
   441 B	0.3 %	ember-data/-private/system/references
   432 B	0.3 %	ember-data/-private/transforms/number
   432 B	0.3 %	ember-data/-private/system/diff-array
   413 B	0.3 %	ember-data/setup-container
   396 B	0.2 %	ember-data/-private/initializers/transforms
   394 B	0.2 %	ember-data/-private/system/model
   348 B	0.2 %	ember-data/-private/system/is-array-like
   339 B	0.2 %	ember-data/-private/initializers/store-injections
   325 B	0.2 %	ember-data/-private/transforms/string
   316 B	0.2 %	ember-data/-private/core
   310 B	0.2 %	ember-data/-private/system/store/serializers
   303 B	0.2 %	ember-data/relationships
   262 B	0.2 %	ember-data/-private/initializers/data-adapter
   240 B	0.1 %	ember-data/-private/system/references/reference
   238 B	0.1 %	ember-data/serializer
   225 B	0.1 %	ember-data/-private/features
   221 B	0.1 %	ember-data/-private/system/clone-null
   218 B	0.1 %	ember-data/-private/system/normalize-model-name
   206 B	0.1 %	ember-data/-private/system/coerce-id
   197 B	0.1 %	ember-data/transform
   171 B	0.1 %	ember-data/model
   171 B	0.1 %	ember-data/store
   153 B	0.1 %	ember-data/version

@stefanpenner
Copy link
Member

Analyze modules appears present twice. Also this functionality exists as part of broccoli-concat see debug usage at: https://github.com/broccolijs/broccoli-concat/blob/master/README.md

(It also provides gzip size)

@stefanpenner
Copy link
Member

The rest looks good

@runspired
Copy link
Contributor Author

@stefanpenner already removed :P github just laggy today

@runspired
Copy link
Contributor Author

@stefanpenner RE broccoli-concat also having this functionality, happy to just remove that script from here, I wrote it to be able to grab the prod versions of assets for putting into our HARRemixes.

@@ -0,0 +1,86 @@
/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets remove this

Copy link
Member

@stefanpenner stefanpenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@runspired
Copy link
Contributor Author

@stefanpenner module removed and commits squashed.

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

Successfully merging this pull request may close these issues.

2 participants