Just FYI:
Since 2018r4 the new URLConnection and the already existing Xojo.Net.HTTPSocket are much slower and have a much higher CPU usage.
The speed decreases about 95 %.
The CPU usage increases about 200 %.
Please note that on macOS, URLConnection has a higher CPU use than HTTPSocket - see case <https://xojo.com/issue/55709> which is private at the moment, but I’ll ask about making it public.
[quote=439232:@Stefan Adelsberger]Unfortunately there’s still a bug with URLConnection which is hard crashing the app and increasing CPU usage extremely:
<https://xojo.com/issue/55849>[/quote]
So far, we haven’t been able to reproduce this here. Has anyone other than Stefan or Michael seen this?
Well ask the reporter if he is catching the exceptions of the class. Cause itt know to hard crash if one doesnt use a try cacht around those type of http sockets. I havnt seen it yet and use them alot. If i notice something let it know.
I had to be very careful getting those screen shots as if I left it too long my machine needed rebooting i.e. required finger on the power button as there was no other response available.
It does sound like that could be the same problem. We just need a project that lets us see the problem here. I understand why Wayne can’t share his project though.
Hi Jason, are you talking about Case 55849? (A windows app locks up when downloading a big file using URLConnection.Send(“GET”, url) without a folderItem?
I’m testing a x64 windows build on a Windows 10 (1903) VM running in Fusion 11.1.0 on macOS 10.14.5. I see the problem both as a built 64 bit exe as well as when remote debugging from mac to Windows. When i click the button, the app starts using 50% CPU (on a 4 cpu system) and gets the “Not Responding” message from windows OS. My router shows little or no data is being downloaded. Letting it run for 10+ minutes - it never recovers.
A 64 bit mac build of the same project fails (it throws an error due to app transport security). But if you add an info.plist file to the project that contains:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<!-- Include to allow all connections; avoid if possible -->
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>
Then it does work. On MacOS it uses more CPU than I’d like (50% ish) but that’s probably a different issue reported here: <https://xojo.com/issue/55709>
Here’s version 4 which has the Info.plist and explicit 64 bit build settings for both platforms - otherwise identical to v 3.