Did the test with a 4,5MB file, non-SSL

Firefox: 2.6s

Saved Uploaded File OK
New File Name: d:\tempwork\telecom\uploads\20160426-021729_Aion 2016.Apr.21
- 10.57.48.png
File Size: 4,553,987
Upload Duration: 2.6 secs
Speed: 1,754,908 chars/sec
Upload FileName: Aion 2016.Apr.21 - 10.57.48.png
FileTitle: aion ss test
Post URL: http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm

ICS: 34.1s

POST /testing/uploadfile.htm HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Referer: http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm
Content-Type: multipart/form-data;
boundary=--------------------147712359214935
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
Firefox/45.0
Host: www1.telecom-tariffs.co.uk
Content-Length: 4554186

34133ms

unit Unit1;
>
> interface
>
> uses
>   Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
> System.Classes, Vcl.Graphics,
>   Vcl.Controls, Vcl.Forms, Vcl.Dialogs, OverbyteIcsWndControl,
>   OverbyteIcsHttpProt, Vcl.StdCtrls, Vcl.ComCtrls,
>
>   MultipartBuilder;
>
> type
>   TForm1 = class(TForm)
>     Button1: TButton;
>     Button2: TButton;
>     HttpCli1: THttpCli;
>     ProgressBar1: TProgressBar;
>     Memo1: TMemo;
>     procedure Button1Click(Sender: TObject);
>     procedure HttpCli1SendData(Sender: TObject; Buffer: Pointer; Len:
> Integer);
>     procedure HttpCli1BeforeHeaderSend(Sender: TObject; const Method:
> string; Headers: TStrings);
>     procedure HttpCli1SendEnd(Sender: TObject);
>   private
>     { Private declarations }
>   public
>     { Public declarations }
>   end;
>
> var
>   Form1: TForm1;
>   x: Int64;
>
> implementation
>
> {$R *.dfm}
>
> procedure TForm1.Button1Click(Sender: TObject);
> Var fil: AnsiString;
>     mp: TMultiPartObject;
>     fl: string;
>     tm: TMemoryStream;
> Const cT = '--------------------147712359214935';
> begin
>   // Fill multipart data+file
>   fl := 'z:\Aion 2016.Apr.21 - 10.57.48.png';
>   mp := TMultiPartObject.Create(cT);
>   tm := TMemoryStream.Create;
>   tm.LoadFromFile(fl);
>   ProgressBar1.Max := tm.Size;
>   With mp do begin
>     AddFileFromStream('image',ExtractFileName(fl),'image/png',tm);
>     CloseData;
>     fil := GetFile;
>   end;
>   mp.Free;
>
>   x := GetTickCount;
>   With HttpCli1 do begin
>     url := 'http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm';
>     SendStream := TMemoryStream.Create;
>     SendStream.Write(fil[1],length(fil));
>     SendStream.Seek(0,0);
>     RcvdStream := TMemoryStream.Create;
>     Timeout := 5;
>     Agent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
> Firefox/45.0';
>     ContentTypePost := 'multipart/form-data; boundary='+cT;
>     Reference := 'http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm
> ';
>     try
>       PostAsync;
>     except
>       On E:Exception do ShowMessage(E.Message);
>     end;
>   end;
> end;
>
> procedure TForm1.HttpCli1BeforeHeaderSend(Sender: TObject; const Method:
> string; Headers: TStrings);
> begin
>   Memo1.Lines.Add(Headers.Text);
> end;
>
> procedure TForm1.HttpCli1SendData(Sender: TObject; Buffer: Pointer; Len:
> Integer);
> begin
>   ProgressBar1.Position := ProgressBar1.Position + Len;
> end;
>
> procedure TForm1.HttpCli1SendEnd(Sender: TObject);
> begin
>   With HttpCli1 do begin
>     SendStream.Free;
>     RcvdStream.Free;
>   end;
>   Memo1.Lines.Add('');
>   Memo1.Lines.Add(IntToStr(GetTickCount-x)+'ms');
> end;
>
> end.
>


On Mon, Apr 25, 2016 at 7:12 PM, Angus Robertson - Magenta Systems Ltd <
an...@magsys.co.uk> wrote:

> > Are there any known issues with SslHttpCli for sending data? I've
> > observed the following:
> > Sending a 3MB picture to imgur:
> > * with ICS/OpenSSL: takes ~27 seconds
>
> Done some testing with a view to investigating this issue, but not
> currently sure it's worth any more time.
>
> I'm using an updated version of the sample OverbyteIcsHttpPost against
> the ICS web server (no SSL).
>
> With both running on my PC:
> File Size: 20,450,630
> Upload Duration: 204 msecs
> Speed: 100,248,186 chars/sec
> Upload FileName: speed20meg.zip
>
> With the ICS web server running on my public server, over FTTC with a
> 10Mbit/sec upload speed, from ICS:
> File Size: 20,450,630
> Upload Duration: 17.56 secs
> Speed: 1,164,349 chars/sec
> Upload FileName: speed20meg.zip
>
> Using Firefox to the same public server:
> File Size: 20,450,630
> Upload Duration: 17.53 secs
> Speed: 1,166,407 chars/sec
> Upload FileName: speed20meg.zip
>
> You can try the public server yourself:
>
> http://www1.telecom-tariffs.co.uk/testing/uploadfile.htm or
> https://www1.telecom-tariffs.co.uk/testing/uploadfile.htm
>
> and it will report the upload speeds, as copied above.  Using SSL and
> Firefox, got the same speeds exactly, not got an SSL version of the ICS
> POST sample, yet.  The web server is running OpenSSL 1.1.0 beta 5 and
> unreleased ICS versions, had to change the web server component to get
> sensible speed measurements.
>
> https://www1.telecom-tariffs.co.uk/serverinfo.htm
>
> For completeness, I will make the HTTP client buffers configurable in
> size, but I really don't expect to see any real difference in upload
> speed, it's seems to be maxed out already.  And this is through two
> Sonicwalls that slow things down.
>
> Angus
>
>
>
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to