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

Download additional channel metadata in the background #592

Closed
dylanmccall opened this issue Jun 12, 2023 · 7 comments · Fixed by #762
Closed

Download additional channel metadata in the background #592

dylanmccall opened this issue Jun 12, 2023 · 7 comments · Fixed by #762
Assignees
Labels
enhancement New feature or request

Comments

@dylanmccall
Copy link
Collaborator

In #548 / #580, we added a system where kolibri-explore-plugin downloads metadata for channels from all content collections, instead of just channels from the initial content collection. At the moment, this is an extra stage in that initial content import which blocks the UI until it is finished. Instead, we would like for this additional metadata download to happen in the background while the user is browsing content.

dbnicholson added a commit that referenced this issue Jun 20, 2023
Like the unavailable content thumbnails, move the download of the extra
channel metadata to the background instead of blocking the initial
starter pack download on it.

Helps: #592
manuq pushed a commit that referenced this issue Jun 21, 2023
Like the unavailable content thumbnails, move the download of the extra
channel metadata to the background instead of blocking the initial
starter pack download on it.

Helps: #592
@manuq manuq added the enhancement New feature or request label Jun 21, 2023
@wjt
Copy link
Member

wjt commented Jun 23, 2023

There are some related PRs for this that we should tie up. But this is still not the case - the additional collections are fetched as part of the onboarding flow. It's not too slow though – we don't include massive channels like Khan Academy! – and this way we don't have to deal with inconsistent state.

@dbnicholson
Copy link
Member

I whipped together something in https://github.com/endlessm/kolibri-explore-plugin/tree/background-downloads. It works pretty nicely but needs a little polish and I need to figure out the right way to ensure incomplete tasks are restarted when the app restarts.

@dbnicholson dbnicholson self-assigned this Aug 22, 2023
dbnicholson added a commit that referenced this issue Aug 22, 2023
Now that there's a way to serialize background tasks, defer downloading
the extra channels so that the initial download completes faster. Since
the thumbnail tasks depend on this, they need to be generated on the fly
when the channel download completes.

Fixes: #592
dbnicholson added a commit that referenced this issue Aug 22, 2023
Now that there's a way to serialize background tasks, defer downloading
the extra channels so that the initial download completes faster. Since
the thumbnail tasks depend on this, they need to be generated on the fly
when the channel download completes.

Fixes: #592
dbnicholson added a commit that referenced this issue Aug 24, 2023
Now that there's a way to serialize background tasks, defer downloading
the extra channels so that the initial download completes faster. Since
the thumbnail tasks depend on this, they need to be generated on the fly
when the channel download completes.

Fixes: #592
dbnicholson added a commit that referenced this issue Aug 24, 2023
Now that there's a way to serialize background tasks, defer downloading
the extra channels so that the initial download completes faster. Since
the thumbnail tasks depend on this, they need to be generated on the fly
when the channel download completes.

Fixes: #592
@dbnicholson
Copy link
Member

I'm going to make a new release so this can be tested out in the apps.

@dbnicholson
Copy link
Member

This has been released as kolibri-explore-plugin 6.39.0 with Android Manatee 6.39-393 and Windows 6.39.1.0.

@vanessa-chang could you test out the Android app from internal testing?

@vanessa-chang
Copy link

I’ve tested the new beta 6.39-393:

  • the content pack download speed is back to normal
  • the contents are revealed after all downloads complete (~app. 10mins of app running time) & it’s show.n after the page is refreshed by switching the tab or restarting the app
  • the app shows a black screen when restarting the app during metadata download (still needs a further clarification)

I will report another ticket for the back screen issue once it’s clarified.

I prefer to have it fixed before we push to the production. Let me know if you have any suggestions. Thank you

@dbnicholson
Copy link
Member

  • the app shows a black screen when restarting the app during metadata download (still needs a further clarification)

I will report another ticket for the back screen issue once it’s clarified.

Please do. I have a feeling this is because the background downloads never actually stop when the app is closed. learningequality/kolibri#11120 will help that a lot but hasn't been released yet.

@vanessa-chang
Copy link

@dbnicholson thanks. I have open the ticket #769 for the issue. I currently report in the Kolibri-explore-plugin repo. However, as this issue cannot be reproduced in the Windows app, let me know if I should file in the other repo for a correction. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants