Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download performance is not linear #34

Open
blegay opened this issue Aug 26, 2024 · 2 comments
Open

Download performance is not linear #34

blegay opened this issue Aug 26, 2024 · 2 comments

Comments

@blegay
Copy link

blegay commented Aug 26, 2024

Hi,

It seems the download performance is not linear.
On a 7G+ file

It starts at 46 Mb/s
It finishes at 17 Mb/s

Plugin version 4.8.2 MacOS...

`
var $options : Object
$options:=New object
$options.HTTPGET:=1
$options.USE_SSL:="USESSL_ALL"
$options.SSL_VERIFYPEER:=2
$options.SSL_VERIFYHOST:=1
$options.CAINFO:="Macintosh HD:Users:ble:Library:Application Support:4D:com.ac-consulting:curllib-component:cacert.pem"
$options.WRITEDATA:="Macintosh HD:Users:ble:Downloads:test-download:"+Generate UUID+".tmp"

//https://curl.se/libcurl/c/CURLOPT_BUFFERSIZE.html

// https://curl.se/libcurl/c/CURLOPT_BUFFERSIZE.html
//$options.BUFFERSIZE:=5121024 //default value
$options.BUFFERSIZE:=10
1024*1024 // max value (faster download if connexion has big throughput) => makes de big difference

$options.URL:="https://example.com/" // a self signed AWS S3 url

var $vl_progressId : Integer
$vl_progressId:=Progress New
$options.PRIVATE:=JSON Stringify(New object("progressId"; $vl_progressId))

var $vx_curlRequestBody; $vx_curlResponseBody : Blob

var $vt_callbackMethod : Text
$vt_callbackMethod:="CURL_callback"

C_OBJECT($vo_curlResponse)
$vo_curlResponse:=cURL($options; $vx_curlRequestBody; $vx_curlResponseBody; $vt_callbackMethod)

Progress QUIT($vl_progressId)
`

I did not look at the code, but it may be related to the way data is appended to a file.

PS : not so important...
Capture d’écran 2024-08-26 à 08 43 56

Capture d’écran 2024-08-26 à 08 52 54
Repository owner locked as spam and limited conversation to collaborators Aug 26, 2024
Repository owner deleted a comment Aug 26, 2024
Repository owner deleted a comment Aug 26, 2024
Repository owner deleted a comment Aug 26, 2024
@miyako
Copy link
Owner

miyako commented Aug 26, 2024

I did not look at the code, but it may be related to the way data is appended to a file.

that might be so. the plugin opens, seeks, writes, closes the file each time it gets data from the library.

@miyako
Copy link
Owner

miyako commented Aug 26, 2024

that said, the download speed is measured internally by the library.
unless you are independently measuring the intervals, it might be because of something different.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants