TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.2k stars 3.03k forks source link

Background prefetch #4932

Open Atemu opened 3 years ago

Atemu commented 3 years ago

Checklist

Describe the feature you want

Loading a videos' page and starting its playback takes a while because various pieces of information have to be fetched from Youtube, often in unconventional, inefficient manners.
Under good network conditions, it's fast enough but doesn't feel particularly nice. On spotty connections however (which are to be expected on phones), it can often take multiple seconds or even time out under especially bad conditions.

Optimising fetch speed may be possible but another way of improving the UX would be to preemptively fetch information the user might need in the future while they are doing something else. At the point the user needs the information and waiting on it becomes the critical path (e.g. clicked on a new video), it would be available instantly.

Considerations:

Is your feature request related to a problem? Please describe it

Opening a video and starting playback can often take upwards of 5s, even under good network conditions.

Additional context

How will you/everyone benefit from this feature?

Less time wasted waiting on things to load, possibly next to none.

=> Better UX

Stypox commented 3 years ago

I don't think this is a good idea. There are already shortcuts in the long press menu to achieve simple actions without having to wait for the buttons to appear, and all of your considerations about slowdowns, issues with Google, higher data and battery use, etc. are big cons.

Atemu commented 3 years ago

There are already shortcuts in the long press menu to achieve simple actions without having to wait for the buttons to appear

Those only cover a few use-cases which don't include the primary purpose of the app: Browsing and watching videos.

and all of your considerations about slowdowns, issues with Google, higher data and battery use, etc. are big cons.

*May be. These are all just potential cons which have to be discussed and/or researched for now.

For example, pre-fetching might not weigh in much in terms of power because the power used by (at worst) an extra few dozen seconds of fetching kilobytes information from the internet should be absolutely dwarfed by the power needed for the minutes or hours of streamed video playback that follow it.