RDP1974 40 Posted February 20, 2023 (edited) 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 February 20, 2023 by RDP1974 Share this post Link to post
RDP1974 40 Posted February 20, 2023 (edited) 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 February 20, 2023 by RDP1974 Share this post Link to post