Skip to content

Reduce bundle size of error codes by creating lookup of errors#1353

Merged
jerelmiller merged 4 commits intomainfrom
jerel/optimize-error-payload
May 6, 2024
Merged

Reduce bundle size of error codes by creating lookup of errors#1353
jerelmiller merged 4 commits intomainfrom
jerel/optimize-error-payload

Conversation

@jerelmiller
Copy link
Copy Markdown
Member

There are many versions that share the same encoded error contents. Rather than creating each of these per-version, this change creates a lookup by id and modifies the version to point to the id of the errors it represents. This means we only need to save new hashes when errors are modified from the client.

@jerelmiller jerelmiller requested a review from phryneas May 6, 2024 03:14
@jerelmiller jerelmiller requested a review from a team as a code owner May 6, 2024 03:14
@relativeci
Copy link
Copy Markdown

relativeci bot commented May 6, 2024

#288 Bundle Size — 841.07KiB (-1.35%).

3af4025(current) vs c56fe41 main#281(baseline)

Warning

Bundle contains 5 duplicate packages – View duplicate packages

Bundle metrics  Change 3 changes Improvement 1 improvement
                 Current
#288
     Baseline
#281
Improvement  Initial JS 803.67KiB(-1.41%) 815.16KiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 5.12% 0%
No change  Chunks 5 5
No change  Assets 12 12
No change  Modules 638 638
No change  Duplicate Modules 35 35
Change  Duplicate Code 5.22%(+0.58%) 5.19%
No change  Packages 58 58
No change  Duplicate Packages 4 4
Bundle size by type  Change 1 change Improvement 1 improvement
                 Current
#288
     Baseline
#281
Improvement  JS 803.67KiB (-1.41%) 815.16KiB
No change  IMG 35.85KiB 35.85KiB
No change  HTML 810B 810B
No change  Other 778B 778B

Bundle analysis reportBranch jerel/optimize-error-payloadProject dashboard

Copy link
Copy Markdown
Member

@phryneas phryneas left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

@jerelmiller jerelmiller merged commit 7da5963 into main May 6, 2024
@jerelmiller jerelmiller deleted the jerel/optimize-error-payload branch May 6, 2024 14:40
@github-actions github-actions bot mentioned this pull request May 6, 2024
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