This repository has been archived by the owner on May 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Prefetch data while running Bubbletea pagination #476
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
troychiu
previously approved these changes
Apr 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome
Can you merge master to get rid of the failure in the unit tests? |
Sure! |
zychen5186
force-pushed
the
bubbletea-paginator
branch
from
April 30, 2024 05:32
3504fa8
to
ef60fcf
Compare
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
Signed-off-by: zychen5186 <[email protected]>
zychen5186
force-pushed
the
bubbletea-paginator
branch
from
April 30, 2024 18:47
ef60fcf
to
6a19d5c
Compare
zychen5186
requested review from
kumare3,
EngHabu and
wild-endeavor
as code owners
April 30, 2024 18:53
close because of moving to monorepo |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
flyteorg/flyte#4440
Follow-up issue
Follow-up of #473
Big thanks to @troychiu for discussing and debugging with me!! 🙌 ❤️