-
Notifications
You must be signed in to change notification settings - Fork 661
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
Add prefetch functionality for paginator #5310
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5310 +/- ##
=======================================
Coverage 61.10% 61.10%
=======================================
Files 794 794
Lines 51213 51213
=======================================
Hits 31295 31295
Misses 17037 17037
Partials 2881 2881
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
954c84c
to
6c0421d
Compare
ab3e054
to
fcea748
Compare
@zychen5186 One of the flytectl tests is failing. Mind taking a look? |
No problem |
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
fcea748
to
228b346
Compare
Congrats on merging your first pull request! 🎉 |
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
TL;DR
The get function takes more time to fetch data from the remote server as the amount increases, hence we only fetch 100 rows initially, and prefetch 100 rows of data at once while the user scrolls through pages to enhance the user experience.
Type
Are all requirements met?
Complete description
For testing run:
We initially fetch the first 100 rows when the paginator is called and start to prefetch the next batch (next 100 rows).
Prefetch will be triggered when the current page exceeds a prefetch threshold.
The first or last batch will be discarded when it exceeds the cache limit (currently set to 1000 rows).
We added a loading animation to indicate the fetching process is ongoing.
Users can use --filter.page flag to specify their starting page, if not specified, page will start from 1.
Tracking Issue
#4440
Follow-up issue
Follow-up of flyteorg/flytectl#473
Big thanks to @troychiu for discussing and debugging with me!! 🙌 ❤️