question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optimize the `bento.js` shared dependency bundle

See original GitHub issue

summary bento.js is a new binary containing dependencies which all of the bento extensions depend on (1). Things like Preact and PreactBaseElement. We should optimize this bundle to be as small as possible.

source-map-explorer image (1)

starting size: 17.62 kb brotli, 54.93 kb uncompressed goal: < 10 kb brotli

opportunities

  • (S) minimize cost of preact/compt: ~1.65
  • (S) parseProps
  • (S) CE Polyfill ~1.5
  • (L) minimize or remove Context: ~3kb
  • your idea here

cc @ampproject/wg-performance / @ampproject/wg-bento / @ampproject/wg-components

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
alanorozcocommented, Nov 16, 2021

starting size: 17.62 kb brotli

bento.mjs is at 15.03 kb after recent changes to remove:

  • CE polyfill
  • side-effects from including forwardRef
  • createPortal
1reaction
alanorozcocommented, Nov 11, 2021

@rcebulko It’s stripped out from the module build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improving JavaScript Bundle Performance With Code-Splitting
Audit the site using bundle analyzer and browser performance profiler, and identify larger components and bundles that take the most time to ...
Read more >
5 Methods to Reduce JavaScript Bundle Size - Bits and Pieces
This analysis provides a clear picture of each library used in your project and how they affect the JavaScript bundle size.
Read more >
How To Optimize Your Next.js Production Build
1. Run the following command to add this package. npm install @next/bundle-analyzer cross-env 2. Next Bundle Analyzer works with the next build command....
Read more >
BentoML
Tip: BentoML provides lots of build options in bentofile.yaml for customizing the Python dependencies, cuda installation, docker image distro, etc.
Read more >
MITLibraries/bento - GitHub
MIT Bento aims to search multiple data sources and return a summary of results to aid a user towards a successful discovery experience....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found