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

Bug: Investigate size-limit regression caused in theory by automatic jsx runtime #6132

Closed
etrepum opened this issue May 17, 2024 · 3 comments · Fixed by #6048
Closed

Bug: Investigate size-limit regression caused in theory by automatic jsx runtime #6132

etrepum opened this issue May 17, 2024 · 3 comments · Fixed by #6048

Comments

@etrepum
Copy link
Contributor

etrepum commented May 17, 2024

I've received some reports that after #6088 was merged there was a size-limit regression. I wasn't given very concrete details about the issue so I am centralizing what I know so far into an issue.

/cc @Sahejkm @StyleT

@etrepum
Copy link
Contributor Author

etrepum commented May 17, 2024

I am not seeing any significant difference in size.

Module v0.14.5 v0.15.0 #6048 #6048/v0.14.5
Lexical.js 22.27 kB 22.44 kB 22.44 kB 0.76%
LexicalRichText.js 32.47 kB 33.08 kB 33.14 kB 2.06%
LexicalPlainText.js 32.47 kB 33.09 kB 33.15 kB 2.09%

Previous v0.14.5 release

$ git checkout v0.14.5 && npm ci && npm run size
[…]
HEAD is now at 32841422 v0.14.5
[…]
  packages/lexical/dist/Lexical.js
  Size:         22.27 kB with all dependencies, minified and brotlied
  Loading time: 436 ms   on slow 3G
  Running time: 191 ms   on Snapdragon 410
  Total time:   626 ms
  
  packages/lexical-rich-text/dist/LexicalRichText.js
  Size:         32.47 kB with all dependencies, minified and brotlied
  Loading time: 635 ms   on slow 3G
  Running time: 500 ms   on Snapdragon 410
  Total time:   1.2 s
  
  packages/lexical-plain-text/dist/LexicalPlainText.js
  Size:         32.47 kB with all dependencies, minified and brotlied
  Loading time: 635 ms   on slow 3G
  Running time: 748 ms   on Snapdragon 410
  Total time:   1.4 s

Latest v0.15.0 release:

$ git checkout v0.15.0 && npm ci && npm run size
[…]
HEAD is now at ea8ca9b2 v0.15.0
[…]
  
  packages/lexical/dist/Lexical.js
  Size:         22.44 kB with all dependencies, minified and brotlied
  Loading time: 439 ms   on slow 3G
  Running time: 290 ms   on Snapdragon 410
  Total time:   728 ms
  
  packages/lexical-rich-text/dist/LexicalRichText.js
  Size:         33.08 kB with all dependencies, minified and brotlied
  Loading time: 647 ms   on slow 3G
  Running time: 891 ms   on Snapdragon 410
  Total time:   1.6 s
  
  packages/lexical-plain-text/dist/LexicalPlainText.js
  Size:         33.09 kB with all dependencies, minified and brotlied
  Loading time: 647 ms   on slow 3G
  Running time: 812 ms   on Snapdragon 410
  Total time:   1.5 s

Current #6048 commit

$ git checkout etrepum/react-19-unit-tests && npm ci && npm run size
[…]
HEAD is now at a48687c6 Remove canary react-beta e2e test before approval
[…]
  packages/lexical/dist/Lexical.js
  Size:         22.44 kB with all dependencies, minified and brotlied
  Loading time: 439 ms   on slow 3G
  Running time: 299 ms   on Snapdragon 410
  Total time:   737 ms
  
  packages/lexical-rich-text/dist/LexicalRichText.js
  Size:         33.14 kB with all dependencies, minified and brotlied
  Loading time: 648 ms   on slow 3G
  Running time: 492 ms   on Snapdragon 410
  Total time:   1.2 s
  
  packages/lexical-plain-text/dist/LexicalPlainText.js
  Size:         33.15 kB with all dependencies, minified and brotlied
  Loading time: 648 ms   on slow 3G
  Running time: 663 ms   on Snapdragon 410
  Total time:   1.4 s

@etrepum
Copy link
Contributor Author

etrepum commented May 17, 2024

@Sahejkm I have a feeling that something is being measured in www that is not being measured in OSS and I just do not have enough information to reproduce whatever result has been flagged so I don't know what direction to to investigate further.

etrepum added a commit to etrepum/lexical that referenced this issue May 17, 2024
@etrepum
Copy link
Contributor Author

etrepum commented May 17, 2024

I added a commit to #6048 that I believe resolves this regression, but size-limit doesn't see anything that happens to the react modules.

#6048 after fix:

$ npm run prepare-release && du -hc packages/lexical-react/dist/*.prod.js | tail -n1
[…]
192K    total

v0.15.0

$ npm ci && npm run prepare-release && du -hc packages/lexical-react/dist/*.prod.js | tail -n1
[…]
188K    total

main (68f0592)

$ npm ci && npm run prepare-release && du -hc packages/lexical-react/dist/*.prod.js | tail -n1
[…]
372K    total

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 a pull request may close this issue.

1 participant