Quick Links: Gideros Home | Download Gideros | Developer Guide
UrlLoader slow on Windows
  • I'm seeing a big difference in download speed using UrlLoader between platforms. Downloading a 15 MB file over the same internet connection with the same Gideros app, the Windows desktop version takes much longer than expected:

    Android app: 20 seconds
    App in Gideros Player on Windows: 20 seconds
    WinRT app: 90 seconds

    Any ideas why the Windows application would be over 4 times slower than either the player or Android version?

    Could this be related to the issue where the WinRT implementation of UrlLoader doesn't trigger progress events except once at the start and once end of the download?

    Paul
  • hgy29hgy29 +1 -1
    Maintainer
    @PaulH, I admit that although it works, WinRT implementation of UrlLoader may not be really efficient: buffers are way too small, hence data is appended by small chunks into a growing buffer (realloc'ed each time a new chunk of bytes is received), etc.
    So I see reasons why it would be slow, indeed. And the way progress is supposed to work in WinRT is a mystery!
  • Thanks for the reply.

    Is this inherent in the WinRT environment, or is it possible to improve the implementation of UrlLoader in Gideros?

    Of course, I'm mostly glad it works at all. When I first tested an in-app download in the WinRT app I thought it wasn't downloading, between the lack of progress events and the much longer download time. I display a progress bar saying "Downloading..." during the process, and the green bar that should be filling it never appears. I made the whole bar flash slowly to prevent giving users the impression the app has locked up.

    Paul
  • PaulH +1 -1
    Member
    Another observation on the WinRT download: If the app loses focus (the user switches to a different application while the download is running) the download makes no progress. I've had a user report half an hour waiting for a download to finish, one that takes me 1.5 minutes on WinRT, and 20 seconds on Android, and I suspect that moving the focus to another app is the reason that it didn't finish in 30 minutes.

    Is the WinRT code for downloads something I can look at directly? If I can help by making that more efficient, I'd be happy to do so for my own sake as well as that of the Gideros community.

    Paul
  • hgy29hgy29 +1 -1
    Maintainer
    Hi @PaulH,

    You'll need to fetch gideros sources from github (https://github.com/gideros/gideros) and compile WinRT libraries yourself. Luckily, this is not the most complex part of gideros build. You'll find a batch file in scripts folder to get you started building WinRT libs: scripts/buildwinrt.bat. UrlLoader implemention will be in libgid/src/winrt/ghttp_winrt.cpp

    Thanks for you help :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID

In this Discussion

Top Posters