Jump to content
Sign in to follow this  
RDP1974

updated webbroker zlib helper (simd accelerated)

Recommended Posts

hi,

I have updated the unit RDPWebBroker64.pas of the library Delphi 64 RTL Intel IPP TBB for more reliability

 

basically we intercept the text kind of the content (text, html, application, json, css) then will compress it using Intel IPP accelerated deflate
average compression of typical json table on a real test is 5x (200KB -> 40KB) and the speed is 5x faster the standard gzip provided with iis

in a third-party detailed test over zlib enhanced libraries, this lib places at the first position for speed with text kind content as the web apps

web apps benefit of drammatic smaller response time (and the price of cloud bandwith can be lowered)

 

enable programmatically the compression in webbroker apps:

procedure TWebModule.WebModuleAfterDispatch(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
 Response.ZlibDeflate;
end;

 

the whole ecosystem of frameworks built over webbroker can use this library transparently
please let me know if you discover memory leaks or if you do benchmark or test over it
(also plz check if the code can be better)

thank you

 

kind regards

Roberto Della Pasqua

Edited by RDP1974

Share this post


Link to post

I'll further optimize the method zlibdeflate avoiding a copy buffer

btw.

be careful to set before the call the correct http content type, example Response.ContentType := 'application/json; charset="UTF-8"';

Edited by RDP1974

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×