Page 1 of 1

Downloadfile, hURL and Async Mode

Posted: Sat Jun 10, 2023 2:53 am
by evil
Hiho!

I want to download movies from different stations in ASync Mode (To be able to continue with other things).

To use the async-mode, DownloadFile() needs to get a handle (called obj in the example).
The Files should be directly stored onto Disk, So I added the option "File="data:test.mp4".

Using hURL v1.x, everything worked fine.

Now with hURL V2 the memory consumptions seems to grow accordingly to the download. Seems, as if the handle includes the downloaded data.

Code: Select all


@REQUIRE "hurl"
Starttimer(1)

Function p_debug(msg)
 debugprint("Time:",INT(GetTimer(1)/1000),"Percent:",INT(msg.count/msg.total*100),"Speed:",INT(msg.count/gettimer(1)),"Loaded:",msg.count,"Total:",msg.total)
EndFunction

obj=DownLoadFile("https://nrodlzdf-a.akamaihd.net/none/zdf/22/10/221018_2215_sendung_37g/1/221018_2215_sendung_37g_a3a4_3360k_p36v15.mp4",{File="data:test.mp4", Adapter="hurl", Async=1},p_debug)
repeat until ContinueAsyncOperation(obj)=1


What am I doing wrong here??

Re: Downloadfile, hURL and Async Mode

Posted: Tue Jun 13, 2023 7:46 pm
by airsoftsoftwair
Which system have you tested this on? On Windows the memory consumption doesn't grow as the download progresses. It's 27 MB from start to end. Actually, there were no changes in hURL's DownloadFile() adapter between 1.2 and 2.0 so if there is a problem here it's probably related to curl 8.0 which is used by hURL 2.0. hURL 1.2 used curl 7.56 or so.

Re: Downloadfile, hURL and Async Mode

Posted: Tue Jun 13, 2023 11:55 pm
by evil
I'm using AmigaOS4
I sent the executable to a MorphOS-user for testing. Waiting for a reply.

Re: Downloadfile, hURL and Async Mode

Posted: Wed Jun 14, 2023 10:50 pm
by airsoftsoftwair
Could also be related to OpenSSL 3 which is used by AmiSSL 5. AFAIR OpenSSL 3 has a reputation for being slower and potentially more memory hungry than the OpenSSL 1 branch.

Re: Downloadfile, hURL and Async Mode

Posted: Wed Jun 14, 2023 11:04 pm
by evil
But in that case it shouldn't matter, if I use hURLV1.2 or V2.0, should it??
The AmiSSL-Version is the same in both cases.

Re: Downloadfile, hURL and Async Mode

Posted: Sun Jun 18, 2023 4:23 pm
by airsoftsoftwair
evil wrote: Wed Jun 14, 2023 11:04 pm But in that case it shouldn't matter, if I use hURLV1.2 or V2.0, should it??
The AmiSSL-Version is the same in both cases.
Does hURL 2.0 still work with AmiSSL 4? AFAIU hURL shouldn't be compatible with AmiSSL 4 because that contains OpenSSL 1.x but hURL 2.0 was compiled against AmiSSL 5 which uses OpenSSL 3 and they aren't compatible.