Skip to content

Firestore: Set DEFAULT_RELATIVE_INDEX_READ_COST_PER_DOCUMENT to 8 in query_engine.ts #7608

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

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Sep 6, 2023

In query_engine.ts the DEFAULT_RELATIVE_INDEX_READ_COST_PER_DOCUMENT value was hardcoded as 2, which was just copied from the Android SDK. Some experimentation has been done and we found that this value should not be hardcoded universally, but should be adjusted based on the browser/OS on which the code is running. More experiment data is needed, so changing the hardcoded value to 8 is the lowest-common-denominator of the experiment data captured so far. A later PR will refine this value.

@dconeybe dconeybe self-assigned this Sep 6, 2023
@changeset-bot
Copy link

changeset-bot bot commented Sep 6, 2023

⚠️ No Changeset found

Latest commit: 246dc0a

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

@dconeybe dconeybe marked this pull request as ready for review September 6, 2023 17:58
@dconeybe dconeybe requested review from a team as code owners September 6, 2023 17:58
@dconeybe dconeybe requested a review from wu-hui September 6, 2023 17:58
@dconeybe dconeybe changed the title Firestore: set DEFAULT_RELATIVE_INDEX_READ_COST_PER_DOCUMENT=8 Firestore: Set DEFAULT_RELATIVE_INDEX_READ_COST_PER_DOCUMENT to 8 in query_engine.ts Sep 6, 2023
@dconeybe dconeybe merged commit 320e58c into master Sep 6, 2023
@dconeybe dconeybe deleted the dconeybe/ClientSideIndexAutoCreationDefaultRelativeIndexReadCostSimpleValue branch September 6, 2023 18:02
@google-oss-bot
Copy link
Contributor

@firebase firebase locked and limited conversation to collaborators Oct 7, 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