Skip to content

Use getAll() when available #5985

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 2 commits into from
Feb 10, 2022
Merged

Use getAll() when available #5985

merged 2 commits into from
Feb 10, 2022

Conversation

schmidt-sebastian
Copy link
Contributor

getAll() is roughly 20% faster than iterate in my local tests with both Safari/Chrome. We should use getAll() for all large read operations.

@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2022

🦋 Changeset detected

Latest commit: 5709430

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/firestore Patch
firebase Patch
@firebase/firestore-compat Patch

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

@schmidt-sebastian schmidt-sebastian changed the title Use getAll() when avaiable Use getAll() when available Feb 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 9, 2022

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (bf93a38)Merge (0d76269)Diff
    browser231 kB231 kB+304 B (+0.1%)
    esm5288 kB289 kB+349 B (+0.1%)
    main460 kB460 kB+523 B (+0.1%)
    module231 kB231 kB+304 B (+0.1%)
    react-native231 kB231 kB+304 B (+0.1%)
  • bundle

    TypeBase (bf93a38)Merge (0d76269)Diff
    firestore (Persistence)232 kB232 kB+298 B (+0.1%)
    firestore (Query Cursors)190 kB190 kB+6 B (+0.0%)
    firestore (Query)191 kB191 kB+6 B (+0.0%)
    firestore (Read data once)180 kB180 kB+6 B (+0.0%)
    firestore (Realtime updates)182 kB182 kB+6 B (+0.0%)
  • firebase

    TypeBase (bf93a38)Merge (0d76269)Diff
    firebase-compat.js755 kB756 kB+298 B (+0.0%)
    firebase-firestore-compat.js283 kB283 kB+298 B (+0.1%)
    firebase-firestore.js780 kB781 kB+993 B (+0.1%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/0N0SY9F6sS.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 9, 2022

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • clearIndexedDbPersistence

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size24.1 kB24.4 kB+297 B (+1.2%)
      size-with-ext-deps72.9 kB73.2 kB+298 B (+0.4%)
    • enableIndexedDbPersistence

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size143 kB144 kB+298 B (+0.2%)
      size-with-ext-deps194 kB194 kB+298 B (+0.2%)
    • enableMultiTabIndexedDbPersistence

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size175 kB175 kB+298 B (+0.2%)
      size-with-ext-deps225 kB226 kB+298 B (+0.1%)
    • getDoc

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size122 kB122 kB+6 B (+0.0%)
      size-with-ext-deps172 kB172 kB+6 B (+0.0%)
    • getDocFromServer

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size122 kB123 kB+6 B (+0.0%)
      size-with-ext-deps172 kB172 kB+6 B (+0.0%)
    • getDocs

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size124 kB124 kB+6 B (+0.0%)
      size-with-ext-deps174 kB174 kB+6 B (+0.0%)
    • getDocsFromServer

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size124 kB124 kB+6 B (+0.0%)
      size-with-ext-deps174 kB174 kB+6 B (+0.0%)
    • onSnapshot

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size125 kB125 kB+6 B (+0.0%)
      size-with-ext-deps175 kB175 kB+6 B (+0.0%)
    • onSnapshotsInSync

      Size

      TypeBase (bf93a38)Merge (0d76269)Diff
      size114 kB114 kB+6 B (+0.0%)
      size-with-ext-deps164 kB164 kB+6 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/apdSHiVEXP.html

@schmidt-sebastian schmidt-sebastian merged commit c1b9cf1 into master Feb 10, 2022
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/getallapi branch February 10, 2022 20:52
@google-oss-bot google-oss-bot mentioned this pull request Feb 16, 2022
@firebase firebase locked and limited conversation to collaborators Mar 13, 2022
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