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
Comments
So I see reasons why it would be slow, indeed. And the way progress is supposed to work in WinRT is a mystery!
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
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
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
Paul
Is there any documentation on setting up the build environment to compile the WinRT libraries? So far I've worked out that I need a command line path that includes Windows Kits 8.1 to pick up fxc.exe, and MSBuild to pick up msbuild.exe.
Paul
Since you've built bin2c.exe from gideros sources, here is the relevant part of /scripts/GidWinRT.mk to build the missing file:
ERROR FindDefaultInterface:CM_Get_Device_Interface_List_Size failed:0x00000000, InterfaceListSize = 1
ERROR SensorOpenByType:Failed to open sensor error:0x00000490
I can't find any relevant code. Any idea if this indicates a problem in the WinRT libraries I've built, or is there more that I'd need to bring over to my exported project besides the libraries themselves?
DataEntryScreen.lua: bad integer in precompiled chunk'giderosgame.Windows.exe'
(... a few more libraries load ...)
The thread 0x2d04 has exited with code 0 (0x0).
Exception thrown at 0x761EA882 (KernelBase.dll) in giderosgame.Windows.exe: 0x40080201: WinRT originate error (parameters: 0x8000001A, 0x0000005D, 0x0361DAFC).
Exception thrown at 0x761EA882 (KernelBase.dll) in giderosgame.Windows.exe: 0x40080201: WinRT originate error (parameters: 0x8000001A, 0x0000001D, 0x0361DCC0).
The thread 0x1f44 has exited with code 0 (0x0).
Exception thrown at 0x761EA882 (KernelBase.dll) in giderosgame.Windows.exe: 0x40080201: WinRT originate error (parameters: 0x8000000B, 0x00000040, 0x0381F6D0).
Thanks for all your help!
Likes: keszegh, PaulH
Likes: antix