Downloadfile, hURL and Async Mode

Discuss about plugins that don't have a dedicated forum
Post Reply
evil
Posts: 177
Joined: Mon Jun 14, 2010 1:38 pm

Downloadfile, hURL and Async Mode

Post 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??
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Downloadfile, hURL and Async Mode

Post 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.
evil
Posts: 177
Joined: Mon Jun 14, 2010 1:38 pm

Re: Downloadfile, hURL and Async Mode

Post by evil »

I'm using AmigaOS4
I sent the executable to a MorphOS-user for testing. Waiting for a reply.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Downloadfile, hURL and Async Mode

Post 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.
evil
Posts: 177
Joined: Mon Jun 14, 2010 1:38 pm

Re: Downloadfile, hURL and Async Mode

Post 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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Downloadfile, hURL and Async Mode

Post 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.
Post Reply