emberjs / data

A lightweight reactive data library for web applications. Designed over composable primitives.
https://api.emberjs.com/ember-data/release
Other
3.03k stars 1.33k forks source link

Asset Size Check Improvements #6677

Open runspired opened 4 years ago

runspired commented 4 years ago

The AssetSizeCheck that runs on PRs could be improved in the following ways, listed below in the order of priority

Minimum Data Check

Because we conditionally remove code that exists to support specific legacy packages (notably model/adapter/serializer) the reported size of store which represents the essential core of ember-data is over-reported. As we work to rationalize the network layer this over-reporting will become even more substantial. It is already likely close to 30% of the reported size of store, and as we continue to deprecate the legacy model world it's likely this number grows as high as 70%.

We should build a tiny package that just installs the store package (the only essential package at this point) and reports it's size. Since most folks will likely choose to use our cache as well we should probably build a similar scenario for those two packages.

Improved Accounting

An example of this is in https://github.com/emberjs/data/pull/8078 where a reduction of about 3.5kb compressed is correct in the total but displays as 75kb in the relative change.

Related #8086 #8103

runspired commented 4 years ago

Related: https://github.com/emberjs/data/issues/6678

runspired commented 4 years ago

Now that our existing infra has had time to mature we've come up with a few tweaks to improving it:

1 - we need a bot to post and manage the results comment since PRs from forks don't have permissions 2- We should update the comment in place instead of deleting it and posting a new one