• NewNewAccount@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      1 year ago

      I recall during my CS studies that predicting loading bars with 100% accuracy is literally impossible. Something about the only way to predict it was to actually perform the action and then report back to the user.

      Did some quick Googling to find a paper or article on this and nothing turned up, unfortunately.

      • Katana314@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I kinda wonder if it’d be possible to actually record data on the operations used, and then incrementally use that to inform future loading bars. I guess it’d have trouble if future runs are going to execute on different hardware, but at least on consoles, it could use some sort of learning algorithm to say “30 seconds of 40 finished”.

        To be fair, I just now realized there’s issues like disk fragmentation if someone is on a PS4/XB1…

      • Thaurin@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        Is that It’s an asynchronous operation and you need to send messages in the form of events back to the UI thread. But it’s difficult to predict how much of the total percentage of progress you just finished in the small part it’s doing, since every part is doing something different or longer-taking. So it’ll jump and won’t be steady. Or, you make a fake one that goes steady and shows down at the end, or something similar. So, fake. :)

    • hschen@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      what do you mean?, ive never heard of loading bars being faked and never had a reason to doubt them, they do what they say. Was i the only one not in on this info?

        • hschen@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Ok, i get it now. Its not fake but rather not accurate. I thought this post meant the loading bars were just made to look like they were doing something, but i do get that sometimes the bar gets stuck on 50% for a while and rushes to 100%. it still is showing the loading % just not accurately

      • shrodes@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Consider this scenario: I ask you how long it would take you to go to the shops and buy a carton of milk.

        You could probably give me a good estimate based on your previous experience going to the shop and buying a carton of milk, but to actually tell me how long it would take would need you to go do the thing then come back and tell me.

        Even with your estimation, something could always go wrong and cause your trip to take longer than expected. Maybe there was a traffic jam, maybe the shops are sold out of milk, maybe you get mugged along the way.

        Loading bars are the same thing. There’s no way to definitively say how long something will take without doing the thing and seeing how long it DID take. The best you can do it an estimation based on known factors (eg. how long does this thing usually take). So in that sense loading bars are fake

        • GoosLife@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Even worse, the person who has to make the estimate doesn’t know anything about the person who has to make the trip. He could live in the store and be done in a single loop, or he could be 90 km out with nothing but a rusty bike for transport.