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

Use estimated dataset count for index page query #4114

Merged
merged 4 commits into from Mar 22, 2024

Conversation

benjaminpkane
Copy link
Contributor

@benjaminpkane benjaminpkane commented Feb 28, 2024

What changes are proposed in this pull request?

Replaces the datasets(search: "") field query for the index page with an optimized estimated dataset count. The current approach is potentially very slow for a database with a large number of datasets.

How is this patch tested? If it is not, please explain why.

e2e coverage

Release Notes

  • Optimized index page load time

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

@benjaminpkane benjaminpkane added the enhancement Code enhancement label Feb 28, 2024
@benjaminpkane benjaminpkane requested a review from a team February 28, 2024 18:41
@benjaminpkane benjaminpkane self-assigned this Feb 28, 2024
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 28.85%. Comparing base (7febb86) to head (ea7f6ff).
Report is 6 commits behind head on develop.

Files Patch % Lines
app/packages/app/src/pages/IndexPage.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4114   +/-   ##
========================================
  Coverage    28.84%   28.85%           
========================================
  Files          768      769    +1     
  Lines        97035    97127   +92     
  Branches      1120     1128    +8     
========================================
+ Hits         27991    28026   +35     
- Misses       69044    69101   +57     
Flag Coverage Δ
app 16.03% <0.00%> (+0.02%) ⬆️
python 99.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

allDatasets: datasets(search: "") {
total
}
allDatasets: estimatedDatasetCount
Copy link
Contributor

Choose a reason for hiding this comment

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

do we also need to update line 29 of this file? Or will it work as is?

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 name of the field is still aliased as allDatasets, I think it should work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My mistake, total is missing now 👍

Copy link
Contributor

@imanjra imanjra left a comment

Choose a reason for hiding this comment

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

Tested locally with empty pages. LGTM!

@benjaminpkane benjaminpkane merged commit 7bf3485 into develop Mar 22, 2024
16 checks passed
@benjaminpkane benjaminpkane deleted the enhancement/estimated-dataset-count branch March 22, 2024 19:09
@coderabbitai coderabbitai bot mentioned this pull request Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Code enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants