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

Axe-core file size #2357

Closed
straker opened this issue Jul 9, 2020 · 4 comments
Closed

Axe-core file size #2357

straker opened this issue Jul 9, 2020 · 4 comments
Labels
help wanted We welcome PRs or discussions for issues marked as help wanted performance Performance related issues
Milestone

Comments

@straker
Copy link
Contributor

straker commented Jul 9, 2020

Below is a table of the sizes of axe.min.js for the last few releases since v3.0.

Release Minified Gzipped
3.0.0 236 kB 67.1 kB
3.1.1 284 kB 78.7 kB
3.2.0 318 kB 89.8 kB
3.3.0 342 kB 94.9 kB
3.4.0 405 kB 108 kB
3.5.0 461 kB 126 kB

If we were to release axe-core v4.0 today (which is not feature complete), we would add ~160 kB (~30 kB gzipped) to the minified file size over v3.4.1 which broke Lighthouses budget when they tried to update to it. From v3.5.0, that's an increase of ~90 kb (~12 kB gzipped).

Release Minified Gzipped
3.4.0 405 kB 108 kB
3.5.0 461 kB 126 kB
4.0.0 553 kB 138 kB

Once v4.0 is feature complete, we will probably add another another 5 kB gzipped (just a guess). What this means is we've doubled the size of axe-core since releasing the last major release v3.0.

We should figure out some way to at least slow our rate of file size increase, if not figure out a max size we want the library to be.

@straker straker added the performance Performance related issues label Jul 9, 2020
@WilcoFiers
Copy link
Contributor

I've discussed this with @dylanb, he is on board with introducing the size budget. To address this, I propose we do the following:

  1. Before we publish axe-core 4.1, we'll define a size budget for axe-core
  2. Every major / minor release, starting with axe-core 4.1 we will reduce the size of axe-core by at least 5kb gzipped since its last major/minor release, until it reaches the size budget.
  3. We will put tests in place which will enforce these requirements are met

To reach the size budget, we may decide to create a new .js file from which deprecated features and polyfills are removed. This will be a one-time thing, features deprecated after this file is introduced will be included to avoid breaking changes.

We are looking for input on what would be a preferable maximum GZipped file size for axe-core.

@straker straker added the help wanted We welcome PRs or discussions for issues marked as help wanted label Jul 23, 2020
@WilcoFiers WilcoFiers added this to the axe-core 4.1 milestone Jul 28, 2020
@straker
Copy link
Contributor Author

straker commented Sep 10, 2020

I propose we should aim for axe-core to be no larger than 100kB gippzed.

@straker
Copy link
Contributor Author

straker commented Sep 28, 2020

Note: I tried switching to terser and didn't see any improvement to our minified / gzip file size using the same options as uglify.

@WilcoFiers
Copy link
Contributor

I'm going to call this done. Axe-core went down from 138k in 4.0 to 108kb in 4.1. We'll still have to define a size budget as per #1930. Pushing that one out to the 4.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We welcome PRs or discussions for issues marked as help wanted performance Performance related issues
Projects
None yet
Development

No branches or pull requests

2 participants