Skip to content

Odyssey Stats: optimize bundle size - #71442

Merged
kangzj merged 3 commits into
trunkfrom
update/optimize-bundle-size
Dec 23, 2022
Merged

kangzj merged 3 commits into
trunkfrom
update/optimize-bundle-size

Conversation

@kangzj

@kangzj kangzj commented Dec 22, 2022 •

Copy link
Copy Markdown
Contributor

Proposed Changes

  • Request WP built in lib except for @wordpress/react-i18n and moment <- we use a fixed list here, as we don't want surprises
  • Fixed broken action-types inline plugin setup
  • Inline client/state/themes/action-types.js

The approaches reduces the size of build.min.js for about 200 KB to about 1.01 MB. The stats bundle on WordPress.com is about 1.07 MB, so we are about at the limit now unless we perform some significant refactoring.

Testing Instructions

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

Related to #

@kangzj kangzj added the [Feature] Stats Everything related to our analytics product at /stats/ label Dec 22, 2022
@kangzj kangzj self-assigned this Dec 22, 2022
@github-actions

github-actions Bot commented Dec 22, 2022 •

Copy link
Copy Markdown

@matticbot

Copy link
Copy Markdown
Contributor

This PR modifies the release build for odyssey-stats

To test your changes on WordPress.com, run install-plugin.sh odyssey-stats update/optimize-bundle-size on your sandbox.

To deploy your changes after merging, see the documentation: PejTkB-3N-p2

@matticbot

Copy link
Copy Markdown
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@kangzj
kangzj requested a review from a team December 22, 2022 21:03
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 22, 2022
@kangzj
kangzj marked this pull request as ready for review December 22, 2022 21:03
@jsnmoon jsnmoon added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 22, 2022
@kangzj
kangzj merged commit 5947969 into trunk Dec 23, 2022
@kangzj
kangzj deleted the update/optimize-bundle-size branch December 23, 2022 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Stats Everything related to our analytics product at /stats/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants