Skip to content

Remove Multi-Tab overhead for non-multi-tab persistence #3362

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

Merged
merged 5 commits into from
Jul 9, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Jul 6, 2020

This PR changes the name of existing IndexedDbComponentProvider to MultiTabComponentProvider and adds a new IndexedDbComponentProvider, which is used in firestore-exp to reduce the code size for users that use enabledIndexedDbPersistence instead of enableMultiTabIndexedDbPersistence. Unfortunately, we have to use MultiTabComponentProvider in the old SDK since we don't know which mode the SDK will end up picking.

@changeset-bot
Copy link

changeset-bot bot commented Jul 6, 2020

🦋 Changeset is good to go

Latest commit: f22f300

We got this.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

],
"variables": []
},
"sizeInBytes": 335737
"sizeInBytes": 311847
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change drops about 24KB from enableIndexedDbPersistence.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 6, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (064cf2e) Head (11f38c6) Diff
    browser 247 kB 247 kB +314 B (+0.1%)
    esm2017 193 kB 194 kB +165 B (+0.1%)
    main 494 kB 494 kB +800 B (+0.2%)
    module 244 kB 244 kB +304 B (+0.1%)
    react-native 194 kB 194 kB +165 B (+0.1%)
  • @firebase/firestore/exp

    Type Base (064cf2e) Head (11f38c6) Diff
    main 398 kB 398 kB +416 B (+0.1%)
  • firebase

    Type Base (064cf2e) Head (11f38c6) Diff
    firebase-firestore.js 285 kB 285 kB +295 B (+0.1%)
    firebase.js 818 kB 818 kB +296 B (+0.0%)

Test Logs

],
"variables": []
},
"sizeInBytes": 335737
"sizeInBytes": 311847
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.

@schmidt-sebastian schmidt-sebastian merged commit 13dfc2f into master Jul 9, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/optmultitab branch July 9, 2020 17:44
@firebase firebase locked and limited conversation to collaborators Aug 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants