Skip to content

Add a Queue system for download and updates. #457

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

Closed
flavioislima opened this issue Jun 16, 2021 · 26 comments · Fixed by #1832
Closed

Add a Queue system for download and updates. #457

flavioislima opened this issue Jun 16, 2021 · 26 comments · Fixed by #1832
Assignees
Labels
enhancement This feature needs upgrades. high priority

Comments

@flavioislima
Copy link
Member

Is your feature request related to a problem? Please describe.
Today Heroic uses parallel downloads what can take a lot of resources from the machine and also bug the installation of games that might show as not installed.

Describe the solution you'd like
A queue system implemented on the Global State. If a game is installing and the user asks to install another one, the last should go to the queue.
After the installation finishes, on the ComponentDidUpdate function a helper function could check if any games are installing, if not, checks the queue and starts to install the new one if have some.

@flavioislima flavioislima added feature-request New feature needs to be implemented. enhancement This feature needs upgrades. and removed feature-request New feature needs to be implemented. labels Jun 16, 2021
@flavioislima flavioislima self-assigned this Jun 17, 2021
@flavioislima flavioislima added this to the 1.8 milestone Jun 17, 2021
@flavioislima flavioislima modified the milestones: 1.8, 1.8.1 Jul 2, 2021
@ghost
Copy link

ghost commented Jul 25, 2021

var queue = []

// when the user requests to install a game
queue.append(app_name)
if (queue[0] === undefined) return;
Game.get(queue[0]).install() // when completes, repeat (recursion)

This helps hopefully? Pseudocode, needs to be refined.

@ghost ghost removed this from the 1.8.1 milestone Aug 1, 2021
@0xf0xx0
Copy link

0xf0xx0 commented Jan 21, 2022

has there been any progress on this? currently i have to wait till a game finishes downloading to download the next one.

@philipwilk
Copy link
Collaborator

philipwilk commented Apr 23, 2022

Summary to date of features wanted for this issue?

  • Queue downloads + updates
  • Ability to modify order of queue
  • Throttle/limit download rate
  • Parallel downloads

@ghost
Copy link

ghost commented Apr 23, 2022

I don't think parallel downloads should be a thing

@philipwilk
Copy link
Collaborator

I don't think parallel downloads should be a thing

Tbf some people have ridiculously fast internet so might want it, but it's kinda unecessary because if it's that fast then it'll be fine downloading everything synchronously.

@0xf0xx0
Copy link

0xf0xx0 commented Apr 24, 2022

Either way, parallel downloads does make it a bit faster, whether you have slow or fast internet.

@ghost
Copy link

ghost commented Apr 24, 2022

Either way, parallel downloads does make it a bit faster, whether you have slow or fast internet.

I disagree. They should be opt-in because synchronously at least you can play 1 game while the other downloads

@0xf0xx0
Copy link

0xf0xx0 commented Apr 24, 2022

Either way, parallel downloads does make it a bit faster, whether you have slow or fast internet.

I disagree. They should be opt-in because synchronously at least you can play 1 game while the other downloads

Oh for sure, it does need to be opt-in. But parallel downloads would bring a decrease in time spent waiting, especially if you're downloading a larger game with smaller games, as the smaller games will finish while the larger game is doing its thing, instead of the smaller games delaying the larger game or vice versa.

@philipwilk
Copy link
Collaborator

Either way, parallel downloads does make it a bit faster, whether you have slow or fast internet.

I disagree. They should be opt-in because synchronously at least you can play 1 game while the other downloads

Oh for sure, it does need to be opt-in. But parallel downloads would bring a decrease in time spent waiting, especially if you're downloading a larger game with smaller games, as the smaller games will finish while the larger game is doing its thing, instead of the smaller games delaying the larger game or vice versa.

You could just queue the small games first and the large one last and it solves that issue.

@0xf0xx0
Copy link

0xf0xx0 commented Apr 24, 2022

Either way, parallel downloads does make it a bit faster, whether you have slow or fast internet.

I disagree. They should be opt-in because synchronously at least you can play 1 game while the other downloads

Oh for sure, it does need to be opt-in. But parallel downloads would bring a decrease in time spent waiting, especially if you're downloading a larger game with smaller games, as the smaller games will finish while the larger game is doing its thing, instead of the smaller games delaying the larger game or vice versa.

You could just queue the small games first and the large one last and it solves that issue.

That's what I touched upon in my reply. In a synchronous queue, the small games would delay the large game, instead of letting it download in the background at the same time.

@philipwilk
Copy link
Collaborator

Either way, parallel downloads does make it a bit faster, whether you have slow or fast internet.

I disagree. They should be opt-in because synchronously at least you can play 1 game while the other downloads

Oh for sure, it does need to be opt-in. But parallel downloads would bring a decrease in time spent waiting, especially if you're downloading a larger game with smaller games, as the smaller games will finish while the larger game is doing its thing, instead of the smaller games delaying the larger game or vice versa.

You could just queue the small games first and the large one last and it solves that issue.

That's what I touched upon in my reply. In a synchronous queue, the small games would delay the large game, instead of letting it download in the background at the same time.

The small games would finish downloading faster because they have the whole bandwidth 😆 so they'd be done faster and wouldn't do that 😅

@flavioislima
Copy link
Member Author

Hey guys, you know that Legendary doesn't support parallel downloads right now, right? So it's not possible to have this in Heroic.
as another question, do you guys know any game launcher that supports that?
Out of my mind: neither Steam, Uplay, EGL or GOG galaxy has it. And that's for a reason: parallel downloads has drawbacks for the system since its pretty intensive on some cases.

About the Queue. We can go for a simple Queue at first, that's means:

  • A Page/place to see the queue
  • Ability to add or remove an item from it.

In the future we can improve that to support:

  • Changing the order of queued items
  • Change the order of items even for started downloads.

⚔️

@ghost
Copy link

ghost commented Apr 25, 2022

Hey guys, you know that Legendary doesn't support parallel downloads right now, right? So it's not possible to have this in Heroic.
as another question, do you guys know any game launcher that supports that?
Out of my mind: neither Steam, Uplay, EGL or GOG galaxy has it. And that's for a reason: parallel downloads has drawbacks for the system since its pretty intensive on some cases.

About the Queue. We can go for a simple Queue at first, that's means:

  • A Page/place to see the queue
  • Ability to add or remove an item from it.

In the future we can improve that to support:

  • Changing the order of queued items
  • Change the order of items even for started downloads.

⚔️

You can launch multiple legendary processes tho.

@flavioislima
Copy link
Member Author

@dragonDScript that doesn't solve the issue. Legendary will override the installed.json file and erase the games that were installed first.

@philipwilk
Copy link
Collaborator

Probably the same with stuff like steam that's why they dont do it lol, or your package manager.

@ghost
Copy link

ghost commented Apr 25, 2022

Chrome supports parallel downloads. And they're fine. That's why people demand this people.

@arielj
Copy link
Collaborator

arielj commented Apr 25, 2022

I agree that parallel downloads can be tricky and maybe too complex for the actual benefit to make it a priority for this feature. A queue solves the main problem of trying to download multiple things without waiting for one to finish, parallelization is some optimization for a specific case that could be treated as a separated feature.

I'm not sure how many users really NEED it (like I imagine people requesting it because they want it, but not as a need), I'd say that parallelization is something that shouldn't block the development of a queue system, maybe something that can be added in the future if found possible.

EDIT: I don't think chrome is a good example, it works concentually different, it just start different downloads that write to its own file and that's it, there's nothing else happening

@philipwilk
Copy link
Collaborator

Chrome supports parallel downloads. And they're fine. That's why people demand this people.

chrome parallel downloads are completely different because it isn't indexing versions in one file

@ghost
Copy link

ghost commented Apr 26, 2022

Chrome supports parallel downloads. And they're fine. That's why people demand this people.

chrome parallel downloads are completely different because it isn't indexing versions in one file

If this is the main reason then lock files exist for a reason

@Etaash-mathamsetty
Copy link
Member

any updates on this?

@ekianjo
Copy link

ekianjo commented Aug 13, 2022

I was about to post a feature request on this, but noticed that this existed. This is a problem not to have a queue system for large downloads that take time. You don't want to lose several hours of download just because you were not around to "click install" for the next game.

@QUASARFREAK
Copy link

+1

1 similar comment
@oleghind
Copy link

+1

@Etaash-mathamsetty
Copy link
Member

Etaash-mathamsetty commented Aug 30, 2022

I found an interesting "bug", I was updating one game, and another game had an update available, so clicked update and both games started updating (at the same time), and finished successfully, and the UI showed both games updating at the same time (it was also displaying it correctly as far as I could tell)
So maybe this feature shouldn't be too difficult to implement?

@Nocccer Nocccer linked a pull request Sep 26, 2022 that will close this issue
4 tasks
@flavioislima flavioislima assigned Nocccer and unassigned flavioislima Sep 30, 2022
@arielj
Copy link
Collaborator

arielj commented Nov 2, 2022

Can we close this? :D

@flavioislima
Copy link
Member Author

Yes, closing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This feature needs upgrades. high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants