-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
"Endless" suggestion list #3122
Comments
So, we have to use pagination in this right @kelson42 ? |
@Chandra-Sekhar-Bala No, this is not what is described |
So, at first we'll load 100 (block size) of data. And based upon the scrolling behavior, we'll load more blocks. This happens until data source exhausted - I guess it is right. |
@Chandra-Sekhar-Bala Yes. UX is fundamentaly different, but not in principle. |
Possible in Qt looks like with something like https://doc.qt.io/qt-5/qtwidgets-itemviews-fetchmore-example.html, here the corresponding feature request for Kiwix Desktop kiwix/kiwix-desktop#413 |
Anyone working on it ?Can I work on it? |
@soCallmeAdityaKumar No bu this might be difficult to achieve this without libkiwix12 introduction. Please wait a bit. |
Seems similar to #440, wonder if we should not close one of these as duplicate |
@kelson42 I hope we would have to use the "RecyclerView" to fix this issue. As soon as the user scrolls, the new list got recycles and updated as the user scrolls the screen until libzim/libkwiix can't deliver any more results.I hope I would definitely fix this issue. |
@javaman97 Would be great if you could implement it. That said I believe you might have to wait introduction of libkiwix12 to be able to request arbitrary suggestions range. Lets wait a few weeks. |
Thanks for having faith on me.I would be happy to help you. |
is this issue still open? i want to contribute. |
@arexnnnn The ticket is obviously open like you can see by yourself. What is your proposal to solve it? |
Hello @kelson42 I would suggest going with lazy loading for this issue, as we want to load when the scroller reaches to the end of let's say 100 suggestions, and then can continue loading more as we go until the library is out of suggestions. Can you confirm if this would be optimal, and I can start contributing to this if it is not taken yet! |
@tanvijain13 LGTM, go for it. |
@kelson42, in PR #3216, we have incorporated the use of libkiwix version 12 binding. Additionally, the search functionality has been refactored. The libkiwix now returns a SearchIterator containing all possible results for a given Currently, we are extracting all results from the SearchIterator and populating our recyclerView. To improve efficiency and ensure a smoother user experience, pagination is suggested as an ideal approach, as proposed by @tanvijain13. However, using the SearchIterator for pagination is not good IMO, since it would require keeping the entire object in memory throughout the pagination process. To achieve efficiency and a smooth user experience. We can retrieve all the results from the SearchIterator and save them to a list, as we were previously doing. Subsequently, we load some initial data (e.g., 200 suggestions) from the list into the recyclerView. As the user scrolls to the bottom of the list, we fetch the next 200 items from the list and display them to the user, continuing this process as needed. By adopting this strategy, we can balance efficiency and user experience while providing a seamless scrolling experience for users interacting with the recyclerView. |
@MohitMaliFtechiz The libkiwix searchiterator does not have all the results in memory. This is anyway not your problem as it happens in the libkiwix. That said, this is indeed a good time to tackle this ticket. Please implement it like requested here: load only what is needed for a proper display and if user scrolls down the list, only then request more. Keep track in kiwix-android only about what has been displayed. Never request the whole resukt set. |
If I look to the PR it still says that it fixes only one ticket. Please use properly "Fixes #..." for each ticket it fixes. |
Current suggestion list can only deliver 200 suggestions maximum, even if we have 10.000. We could do better.
We should have an "endless" suggestion list which can be growing as long as the libzim/libkiwix delivers results. Basically the suggestion list could load blocks of (for example) 100 suggestions, and when the users attempt to reach the end of the list, then Kiwix would load dynamically the next 100 batch of suggestions. This until libzim/libkwiix can not deliver any result anymore.
The text was updated successfully, but these errors were encountered: