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

Upgrade from 9.10.0 to 10.11.0 leads to 46kB increase in bundle size #8171

Open
GaurangTandon opened this issue Apr 16, 2024 · 3 comments
Open

Comments

@GaurangTandon
Copy link

GaurangTandon commented Apr 16, 2024

Operating System

macOS

Browser Version

Chrome 123

Firebase SDK Version

10.11.0

Firebase SDK Product:

Auth, Firestore, Functions

Describe your project's tooling

React app with create-react-app default configuration.

Describe the problem

When upgrading from 9.10.0 to 10.11.0, I notice the bundle size is increased by 46606 bytes. This is a huge increase and it's unclear why it has happened, given that we are still using the same functions and interfaces as before.

I did run webpack-bundle-analyzer and couldn't find anything different in the bundle structure.

This is the new bundle:

This is the old bundle:

All components have increased in size proportionately. There's no one bundle that seems to jump out.

Steps and code to reproduce issue

You can create a create-react-app project with the relevant firebase products (auth/firestore/functions) and build it with 9.10.0 and 10.11.0 and notice the difference in bundle size.

@GaurangTandon GaurangTandon added new A new issue that hasn't be categoirzed as question, bug or feature request question labels Apr 16, 2024
@jbalidiong jbalidiong added needs-attention and removed new A new issue that hasn't be categoirzed as question, bug or feature request labels Apr 16, 2024
@dconeybe dconeybe self-assigned this Apr 16, 2024
@dconeybe
Copy link
Contributor

Thanks for reporting this issue. I checked out Firestore specifically and noticed it grew by 32,022 bytes (11%) in my contrived scenario. I'll see if I can find any spikes or if it grew organically over time as new features were added.

@dconeybe
Copy link
Contributor

It turns out that this growth is organic, due to new features and performance improvements. That's not to say that there isn't some room for improvement. I've logged b/335277615 internally to track an investigation into this for Firestore. I cannot make any promises on if and when we will get the bundle size reduced; however, it is on our radar.

@dconeybe
Copy link
Contributor

FYI #8178 will reduce the bundle size by about 6.5 kB (for apps that just use the default "memory" persistence and don't use indexeddb persistence). This increase was accidentally introduced in v10.7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants