Skip to content

Lag when many downloaded items are loaded on Download page #12547

@fynngodau

Description

@fynngodau

Checklist

  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

dev / 0.28..0

Steps to reproduce the bug

  1. Download many videos (> 200)
  2. Close app completely
  3. Open app, navigate to Download screen

Expected behavior

  • Database query is done on separate thread, UI does not lag
  • Checking whether file exists is performed after the list is shown (items are removed after already being displayed)

Actual behavior

  • Database query is done on main / UI thread
  • Every file is checked individually, also on UI thread

Additional information

DownloadManagerloadFinishedMissions() is called upon init, which performs database queries and file system operations synchronously.

Note that > 200 checks whether files exist can also take multiple seconds.

Please also take a look at valuable comment from #9672 there is a attached logcat in it

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIIssue is related to the graphical user interfacebugIssue is related to a bugdownloaderIssue is related to the downloader

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions