Skip to content

Firestore: settings.ts: very minor refactor of long-polling logic. #7239

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 10 commits into from
Apr 21, 2023

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Apr 20, 2023

This minor refactor makes a follow-up PR, #7236, that enables long-polling by default more focused. Otherwise, no logic is changed by this PR; only the code is reorganized a bit.

@dconeybe dconeybe self-assigned this Apr 20, 2023
@changeset-bot
Copy link

changeset-bot bot commented Apr 20, 2023

⚠️ No Changeset found

Latest commit: c27a49a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

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

Click here to learn what changesets are, and how to add one.

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 20, 2023

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (61910bd)Merge (7a5e77c)Diff
    browser285 kB285 kB+166 B (+0.1%)
    esm5354 kB354 kB+122 B (+0.0%)
    main566 kB567 kB+269 B (+0.0%)
    module285 kB285 kB+166 B (+0.1%)
    react-native285 kB285 kB+166 B (+0.1%)
  • @firebase/firestore-lite

    TypeBase (61910bd)Merge (7a5e77c)Diff
    browser87.5 kB87.7 kB+167 B (+0.2%)
    esm5105 kB106 kB+123 B (+0.1%)
    main149 kB149 kB+269 B (+0.2%)
    module87.5 kB87.7 kB+167 B (+0.2%)
    react-native87.7 kB87.9 kB+167 B (+0.2%)
  • bundle

    12 size changes

    TypeBase (61910bd)Merge (7a5e77c)Diff
    firestore (Persistence)298 kB298 kB+166 B (+0.1%)
    firestore (Query Cursors)236 kB236 kB+166 B (+0.1%)
    firestore (Query)234 kB234 kB+166 B (+0.1%)
    firestore (Read data once)221 kB221 kB+166 B (+0.1%)
    firestore (Realtime updates)223 kB223 kB+166 B (+0.1%)
    firestore (Transaction)200 kB201 kB+166 B (+0.1%)
    firestore (Write data)200 kB200 kB+166 B (+0.1%)
    firestore-lite (Query Cursors)81.4 kB81.6 kB+167 B (+0.2%)
    firestore-lite (Query)77.6 kB77.7 kB+167 B (+0.2%)
    firestore-lite (Read data once)59.7 kB59.9 kB+167 B (+0.3%)
    firestore-lite (Transaction)84.5 kB84.7 kB+167 B (+0.2%)
    firestore-lite (Write data)69.4 kB69.5 kB+167 B (+0.2%)

  • firebase

    TypeBase (61910bd)Merge (7a5e77c)Diff
    firebase-compat.js771 kB771 kB+122 B (+0.0%)
    firebase-firestore-compat.js337 kB338 kB+122 B (+0.0%)
    firebase-firestore-lite.js94.3 kB94.4 kB+123 B (+0.1%)
    firebase-firestore.js344 kB344 kB+122 B (+0.0%)

Test Logs

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

if (!settings.experimentalForceLongPolling) {
this.experimentalForceLongPolling = false;
this.experimentalAutoDetectLongPolling =
settings.experimentalAutoDetectLongPolling ?? false;
Copy link
Contributor

@tom-andersen tom-andersen Apr 20, 2023

Choose a reason for hiding this comment

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

I think we should respect previous code that would ensure runtime type is boolean.

I prefer using Boolean function instead of !!, but your call.

This was helpful to me when considering trade off: https://gist.github.com/arthurvi/66cb1e2bcfc92f99f465e0db04264367

ALSO: The other PR seems to have logic reversed settings.experimentalAutoDetectLongPolling ?? true. Is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point about coercing to boolean. I've changed the code to first check if settings.experimentalAutoDetectLongPolling === undefined, after which TypeScript narrows the type of settings.experimentalAutoDetectLongPolling to boolean (from boolean|undefined).

Technically, it is still possible that some non-boolean value is specified but we don't tend to do type checking in our code base for things that the TypeScript compiler would detect at compile time. If you feel strongly that I should still coerce the type to boolean then I will; however, note that this causes a warning in IntelliJ:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other PR seems to have logic reversed

Yes, that is intentional. In fact, the entire purpose of the follow up PR #7236 is to change the default to true from false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As a tangent, we tend to use !! in our code base, for better or worse. I can't think of any time I've seen Boolean() used. So, when choosing between the two I'd pick the one that matches the local convention, namely !!.

Copy link
Contributor

Choose a reason for hiding this comment

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

TLDR: All this will be very opinionated, so in the end, I am ok with original code and your new code, so I will simply approve. Feel free to make further changes if you want.

Here is the TL part:

Looking at surrounding code and digging a little deeper, I do see many things worth noting.

  1. IntelliJ doesn't complain when using Boolean(..) instead of !!.
  2. DEFAULT_SSL uses the ?? operator, so if it is a problem here, it will also be a problem there.
  3. Handling these corner cases is increasing code size, but adding questionable value. I think there is a trade off to consider.
  4. DEFAULT_SSL introduces a constant. That pattern, if followed, implies that long polling should also have constants. But this only serves to bloat the code further.
  5. I am not sure whether minification will help with any of the above. I suspect not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for these thoughts, Tom.

I've opened a new PR, #7242, which expands the unit test suite to also verify how "truthy" and "falsy" values are coerced into boolean. PTAL if you don't mind. I wanted to add those tests in a separate PR (rather than including them in this PR) in order to "prove" that there are no behavior changes introduced by this PR.

To avoid unintentionally introducing any backwards incompatibilities, I'm also going to modify this PR to coerce to boolean. I've also modified the logic to more closely mirror that of DEFAULT_SSL, as you pointed out. Namely, I've added a new constant, DEFAULT_AUTO_DETECT_LONG_POLLING, and used the ?? operator where appropriate.

Personally, I'm not concerned about the code size increases from changes like this since the delta will be minuscule.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 20, 2023

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • AbstractUserDataWriter

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size24.5 kB24.7 kB+166 B (+0.7%)
      size-with-ext-deps94.0 kB94.1 kB+166 B (+0.2%)
    • AggregateField

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.1 kB86.2 kB+166 B (+0.2%)
    • AggregateQuerySnapshot

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.9 kB+166 B (+1.0%)
      size-with-ext-deps86.1 kB86.3 kB+166 B (+0.2%)
    • Bytes

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size18.1 kB18.2 kB+166 B (+0.9%)
      size-with-ext-deps87.5 kB87.6 kB+166 B (+0.2%)
    • CACHE_SIZE_UNLIMITED

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.7 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.1 kB+166 B (+0.2%)
    • CollectionReference

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size20.2 kB20.3 kB+166 B (+0.8%)
      size-with-ext-deps89.6 kB89.7 kB+166 B (+0.2%)
    • DocumentReference

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size20.2 kB20.3 kB+166 B (+0.8%)
      size-with-ext-deps89.6 kB89.7 kB+166 B (+0.2%)
    • DocumentSnapshot

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size23.6 kB23.8 kB+166 B (+0.7%)
      size-with-ext-deps93.1 kB93.2 kB+166 B (+0.2%)
    • FieldPath

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size19.2 kB19.4 kB+166 B (+0.9%)
      size-with-ext-deps88.7 kB88.8 kB+166 B (+0.2%)
    • FieldValue

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.2 kB+166 B (+0.2%)
    • Firestore

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.7 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.1 kB+166 B (+0.2%)
    • FirestoreError

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.7 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.1 kB+166 B (+0.2%)
    • GeoPoint

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.1 kB17.3 kB+166 B (+1.0%)
      size-with-ext-deps86.5 kB86.7 kB+166 B (+0.2%)
    • LoadBundleTask

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.4 kB17.6 kB+166 B (+1.0%)
      size-with-ext-deps86.8 kB87.0 kB+166 B (+0.2%)
    • Query

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.9 kB+166 B (+1.0%)
      size-with-ext-deps86.1 kB86.3 kB+166 B (+0.2%)
    • QueryCompositeFilterConstraint

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size19.8 kB20.0 kB+166 B (+0.8%)
      size-with-ext-deps89.3 kB89.4 kB+166 B (+0.2%)
    • QueryConstraint

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.2 kB+166 B (+0.2%)
    • QueryDocumentSnapshot

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size23.6 kB23.8 kB+166 B (+0.7%)
      size-with-ext-deps93.1 kB93.3 kB+166 B (+0.2%)
    • QueryEndAtConstraint

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size35.3 kB35.5 kB+166 B (+0.5%)
      size-with-ext-deps105 kB105 kB+166 B (+0.2%)
    • QueryFieldFilterConstraint

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size41.0 kB41.2 kB+166 B (+0.4%)
      size-with-ext-deps111 kB111 kB+166 B (+0.2%)
    • QueryLimitConstraint

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.3 kB17.5 kB+166 B (+1.0%)
      size-with-ext-deps86.7 kB86.9 kB+166 B (+0.2%)
    • QueryOrderByConstraint

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size18.4 kB18.5 kB+166 B (+0.9%)
      size-with-ext-deps87.8 kB87.9 kB+166 B (+0.2%)
    • QuerySnapshot

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size25.6 kB25.7 kB+166 B (+0.6%)
      size-with-ext-deps95.0 kB95.2 kB+166 B (+0.2%)
    • QueryStartAtConstraint

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size35.3 kB35.5 kB+166 B (+0.5%)
      size-with-ext-deps105 kB105 kB+166 B (+0.2%)
    • SnapshotMetadata

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.9 kB+166 B (+1.0%)
      size-with-ext-deps86.1 kB86.3 kB+166 B (+0.2%)
    • Timestamp

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.7 kB17.9 kB+166 B (+0.9%)
      size-with-ext-deps87.2 kB87.3 kB+166 B (+0.2%)
    • Transaction

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size50.2 kB50.4 kB+166 B (+0.3%)
      size-with-ext-deps120 kB120 kB+166 B (+0.1%)
    • WriteBatch

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size47.1 kB47.2 kB+166 B (+0.4%)
      size-with-ext-deps117 kB117 kB+166 B (+0.1%)
    • _DatabaseId

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.7 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.1 kB+166 B (+0.2%)
    • _DocumentKey

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size25.8 kB26.0 kB+166 B (+0.6%)
      size-with-ext-deps95.3 kB95.5 kB+166 B (+0.2%)
    • _EmptyAppCheckTokenProvider

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.1 kB86.2 kB+166 B (+0.2%)
    • _EmptyAuthCredentialsProvider

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.7 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.1 kB+166 B (+0.2%)
    • _FieldPath

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size19.0 kB19.1 kB+166 B (+0.9%)
      size-with-ext-deps88.4 kB88.6 kB+166 B (+0.2%)
    • _TestingHooks

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.0 kB17.1 kB+166 B (+1.0%)
      size-with-ext-deps86.4 kB86.5 kB+166 B (+0.2%)
    • _cast

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.3 kB17.5 kB+166 B (+1.0%)
      size-with-ext-deps86.7 kB86.9 kB+166 B (+0.2%)
    • _debugAssert

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.1 kB+166 B (+0.2%)
    • _isBase64Available

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.2 kB+166 B (+0.2%)
    • _logWarn

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.1 kB86.2 kB+166 B (+0.2%)
    • _validateIsNotUsedTogether

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.7 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.1 kB+166 B (+0.2%)
    • addDoc

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size120 kB120 kB+166 B (+0.1%)
      size-with-ext-deps190 kB190 kB+166 B (+0.1%)
    • aggregateFieldEqual

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.9 kB17.1 kB+166 B (+1.0%)
      size-with-ext-deps86.3 kB86.5 kB+166 B (+0.2%)
    • aggregateQuerySnapshotEqual

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size32.8 kB33.0 kB+166 B (+0.5%)
      size-with-ext-deps103 kB103 kB+166 B (+0.2%)
    • and

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size42.5 kB42.6 kB+166 B (+0.4%)
      size-with-ext-deps112 kB112 kB+166 B (+0.1%)
    • arrayRemove

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size29.3 kB29.4 kB+166 B (+0.6%)
      size-with-ext-deps98.8 kB98.9 kB+166 B (+0.2%)
    • arrayUnion

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size29.3 kB29.4 kB+166 B (+0.6%)
      size-with-ext-deps98.8 kB98.9 kB+166 B (+0.2%)
    • average

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size20.2 kB20.4 kB+166 B (+0.8%)
      size-with-ext-deps89.7 kB89.9 kB+166 B (+0.2%)
    • clearIndexedDbPersistence

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size25.3 kB25.5 kB+166 B (+0.7%)
      size-with-ext-deps94.9 kB95.1 kB+166 B (+0.2%)
    • collection

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size20.9 kB21.0 kB+166 B (+0.8%)
      size-with-ext-deps90.4 kB90.5 kB+166 B (+0.2%)
    • collectionGroup

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size19.9 kB20.0 kB+166 B (+0.8%)
      size-with-ext-deps89.3 kB89.5 kB+166 B (+0.2%)
    • connectFirestoreEmulator

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size18.4 kB18.5 kB+166 B (+0.9%)
      size-with-ext-deps88.3 kB88.5 kB+166 B (+0.2%)
    • count

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.9 kB+166 B (+1.0%)
      size-with-ext-deps86.1 kB86.3 kB+166 B (+0.2%)
    • deleteDoc

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size111 kB111 kB+166 B (+0.1%)
      size-with-ext-deps181 kB181 kB+166 B (+0.1%)
    • deleteField

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.9 kB17.1 kB+166 B (+1.0%)
      size-with-ext-deps86.3 kB86.5 kB+166 B (+0.2%)
    • disableNetwork

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size99.5 kB99.6 kB+166 B (+0.2%)
      size-with-ext-deps169 kB170 kB+166 B (+0.1%)
    • doc

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size20.9 kB21.1 kB+166 B (+0.8%)
      size-with-ext-deps90.4 kB90.6 kB+166 B (+0.2%)
    • documentId

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size19.3 kB19.5 kB+166 B (+0.9%)
      size-with-ext-deps88.7 kB88.9 kB+166 B (+0.2%)
    • enableIndexedDbPersistence

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size181 kB181 kB+166 B (+0.1%)
      size-with-ext-deps253 kB253 kB+166 B (+0.1%)
    • enableMultiTabIndexedDbPersistence

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size218 kB218 kB+166 B (+0.1%)
      size-with-ext-deps289 kB289 kB+166 B (+0.1%)
    • enableNetwork

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size99.4 kB99.6 kB+166 B (+0.2%)
      size-with-ext-deps169 kB170 kB+166 B (+0.1%)
    • endAt

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size35.4 kB35.6 kB+166 B (+0.5%)
      size-with-ext-deps105 kB105 kB+166 B (+0.2%)
    • endBefore

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size35.4 kB35.6 kB+166 B (+0.5%)
      size-with-ext-deps105 kB105 kB+166 B (+0.2%)
    • ensureFirestoreConfigured

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.1 kB86.2 kB+166 B (+0.2%)
    • executeWrite

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size110 kB110 kB+166 B (+0.2%)
      size-with-ext-deps180 kB180 kB+166 B (+0.1%)
    • getAggregateFromServer

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size107 kB107 kB+166 B (+0.2%)
      size-with-ext-deps177 kB177 kB+166 B (+0.1%)
    • getCountFromServer

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size107 kB107 kB+166 B (+0.2%)
      size-with-ext-deps177 kB177 kB+166 B (+0.1%)
    • getDoc

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size141 kB141 kB+166 B (+0.1%)
      size-with-ext-deps211 kB211 kB+166 B (+0.1%)
    • getDocFromCache

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size92.1 kB92.3 kB+166 B (+0.2%)
      size-with-ext-deps162 kB162 kB+166 B (+0.1%)
    • getDocFromServer

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size141 kB141 kB+166 B (+0.1%)
      size-with-ext-deps211 kB211 kB+166 B (+0.1%)
    • getDocs

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size142 kB142 kB+166 B (+0.1%)
      size-with-ext-deps212 kB213 kB+166 B (+0.1%)
    • getDocsFromCache

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size99.8 kB99.9 kB+166 B (+0.2%)
      size-with-ext-deps169 kB170 kB+166 B (+0.1%)
    • getDocsFromServer

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size142 kB142 kB+166 B (+0.1%)
      size-with-ext-deps212 kB212 kB+166 B (+0.1%)
    • getFirestore

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size18.6 kB18.8 kB+166 B (+0.9%)
      size-with-ext-deps96.2 kB96.4 kB+166 B (+0.2%)
    • increment

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.4 kB17.6 kB+166 B (+1.0%)
      size-with-ext-deps86.8 kB87.0 kB+166 B (+0.2%)
    • initializeFirestore

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.5 kB17.6 kB+166 B (+0.9%)
      size-with-ext-deps87.4 kB87.5 kB+166 B (+0.2%)
    • limit

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.5 kB17.7 kB+166 B (+0.9%)
      size-with-ext-deps86.9 kB87.1 kB+166 B (+0.2%)
    • limitToLast

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size17.5 kB17.7 kB+166 B (+0.9%)
      size-with-ext-deps86.9 kB87.1 kB+166 B (+0.2%)
    • loadBundle

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size109 kB109 kB+166 B (+0.2%)
      size-with-ext-deps179 kB179 kB+166 B (+0.1%)
    • memoryEagerGarbageCollector

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size82.7 kB82.9 kB+166 B (+0.2%)
      size-with-ext-deps152 kB153 kB+166 B (+0.1%)
    • memoryLocalCache

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size96.6 kB96.7 kB+166 B (+0.2%)
      size-with-ext-deps167 kB167 kB+166 B (+0.1%)
    • memoryLruGarbageCollector

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size89.2 kB89.4 kB+166 B (+0.2%)
      size-with-ext-deps159 kB159 kB+166 B (+0.1%)
    • namedQuery

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size85.6 kB85.8 kB+166 B (+0.2%)
      size-with-ext-deps155 kB155 kB+166 B (+0.1%)
    • onSnapshot

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size143 kB143 kB+166 B (+0.1%)
      size-with-ext-deps213 kB213 kB+166 B (+0.1%)
    • onSnapshotsInSync

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size132 kB133 kB+166 B (+0.1%)
      size-with-ext-deps203 kB203 kB+166 B (+0.1%)
    • or

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size42.5 kB42.6 kB+166 B (+0.4%)
      size-with-ext-deps112 kB112 kB+166 B (+0.1%)
    • orderBy

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size21.9 kB22.0 kB+166 B (+0.8%)
      size-with-ext-deps91.3 kB91.5 kB+166 B (+0.2%)
    • persistentLocalCache

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size179 kB179 kB+166 B (+0.1%)
      size-with-ext-deps250 kB250 kB+166 B (+0.1%)
    • persistentMultipleTabManager

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size215 kB215 kB+166 B (+0.1%)
      size-with-ext-deps286 kB286 kB+166 B (+0.1%)
    • persistentSingleTabManager

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size178 kB178 kB+166 B (+0.1%)
      size-with-ext-deps250 kB250 kB+166 B (+0.1%)
    • query

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size42.7 kB42.9 kB+166 B (+0.4%)
      size-with-ext-deps112 kB112 kB+166 B (+0.1%)
    • queryEqual

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size32.7 kB32.9 kB+166 B (+0.5%)
      size-with-ext-deps102 kB102 kB+166 B (+0.2%)
    • refEqual

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size20.3 kB20.5 kB+166 B (+0.8%)
      size-with-ext-deps89.8 kB90.0 kB+166 B (+0.2%)
    • runTransaction

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size120 kB120 kB+166 B (+0.1%)
      size-with-ext-deps190 kB190 kB+166 B (+0.1%)
    • serverTimestamp

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.9 kB17.0 kB+166 B (+1.0%)
      size-with-ext-deps86.3 kB86.4 kB+166 B (+0.2%)
    • setDoc

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size119 kB119 kB+166 B (+0.1%)
      size-with-ext-deps189 kB190 kB+166 B (+0.1%)
    • setIndexConfiguration

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size88.3 kB88.4 kB+166 B (+0.2%)
      size-with-ext-deps158 kB158 kB+166 B (+0.1%)
    • setLogLevel

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.6 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.0 kB86.2 kB+166 B (+0.2%)
    • snapshotEqual

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size38.4 kB38.6 kB+166 B (+0.4%)
      size-with-ext-deps108 kB108 kB+166 B (+0.2%)
    • startAfter

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size35.4 kB35.6 kB+166 B (+0.5%)
      size-with-ext-deps105 kB105 kB+166 B (+0.2%)
    • startAt

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size35.4 kB35.6 kB+166 B (+0.5%)
      size-with-ext-deps105 kB105 kB+166 B (+0.2%)
    • sum

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size20.2 kB20.4 kB+166 B (+0.8%)
      size-with-ext-deps89.7 kB89.9 kB+166 B (+0.2%)
    • terminate

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size16.7 kB16.8 kB+166 B (+1.0%)
      size-with-ext-deps86.3 kB86.4 kB+166 B (+0.2%)
    • updateDoc

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size120 kB120 kB+166 B (+0.1%)
      size-with-ext-deps190 kB190 kB+166 B (+0.1%)
    • waitForPendingWrites

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size99.9 kB100 kB+166 B (+0.2%)
      size-with-ext-deps170 kB170 kB+166 B (+0.1%)
    • where

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size41.8 kB42.0 kB+166 B (+0.4%)
      size-with-ext-deps111 kB112 kB+166 B (+0.1%)
    • writeBatch

      Size

      TypeBase (61910bd)Merge (7a5e77c)Diff
      size122 kB122 kB+166 B (+0.1%)
      size-with-ext-deps192 kB192 kB+166 B (+0.1%)

Test Logs

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

@dconeybe dconeybe requested a review from tom-andersen April 20, 2023 15:07
@dconeybe dconeybe assigned tom-andersen and unassigned dconeybe Apr 20, 2023
Copy link
Contributor

@tom-andersen tom-andersen left a comment

Choose a reason for hiding this comment

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

I think we are entering very opinionated territory, so I am just going to say LGTM.

@dconeybe dconeybe changed the base branch from master to dconeybe/LongPollingCoerceToBooleanTests April 20, 2023 17:42
Base automatically changed from dconeybe/LongPollingCoerceToBooleanTests to master April 20, 2023 20:34
@dconeybe dconeybe merged commit f5aec7b into master Apr 21, 2023
@dconeybe dconeybe deleted the dconeybe/LongPollingLogicTweak branch April 21, 2023 01:10
@firebase firebase locked and limited conversation to collaborators Jun 1, 2023
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