Jump to content

RDP1974

Members
  • Content Count

    198
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by RDP1974

  1. many people asked me about an allocator compiled statically as object, with LLVM clang for example I have seen many builds from many authors, but as far I have tested them, cannot be possible to produce static objects compatible, many of them are producing C++ libs, some other are using C runtime functions not available under delphi, or using special $tls api not implemented in the linker, or calling visual c runtime (in windows port).
  2. hi, the lib will automatically adapts functions upon the instruction set of the cpu. From sse2 to avx512. Personally I use it on servers and also, for example in desktop apps with devexpress vcl grids, firedac, etc. Runs on production over i3, i5, i7, i9 without glitches and absolutely reliable. I had thousands of downloads without problems reported, but thanks. look, obviously runs in 64bit only. Consider with some libraries the mmalloc can produce exceptions, you should see the source and correct, anyway rarely happens on bad code on debug mode. btw. I’m non endorsed with Intel, simply these libs are very excellent and well used in industry. Kind regards. Btw. for sources simply install from the links the products, there is a cmake for mmalloc and a python script for the rtl. Btw. of course I prefer native pascal roots, waiting the enhancements on next Delphi updates.
  3. Hi, about allocator, it's well used in industry as for videogames, server apps, the large initial footprint is due to a caching tls thread pool, and it is negligible imho but there is not only the mm, the patch replaces fundamental RTL: function SeaZero(Pdst: PByte; Len: NativeUint): Integer; cdecl; // fillchar 0 (zeromem) function SeaCopy(const Psrc: PByte; Pdst: PByte; Len: NativeUint): Integer; // copymem function SeaMove(const Psrc: PByte; Pdst: PByte; Len: NativeUint): Integer; //movemem function SeaSet(Val: Byte; Pdst: PByte; Len: NativeUint): Integer; cdecl; // fillchar with #char function SeaFind(const Psrc: PByte; Len: NativeUint; const Pfind: PByte; Lenfind: NativeUint; Pindex: PNativeUint): Integer; cdecl; //very fast Pos() function SeaCompare(const Psrc1: PByte; const Psrc2: PByte; Len: NativeInt; Presult: PNativeInt): Integer; cdecl; // comparemem function SeaUpperCase(const PSrcDst: PByte; Len: NativeUint): Integer; cdecl; // uppercase Latin 8bit function SeaReplace(const Psrc: PByte; Pdst: PByte; Len: NativeUint; oldVal: Byte; ipp8u: Byte): Integer; cdecl; // char replace then zlib too it is patched to use simd instructions (5x faster than default gzip) the sources are from these tools https://www.intel.com/content/www/us/en/developer/tools/oneapi/ipp.html and https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html I cannot post Intel sources of course I can tell that the DLLs are done perfectly with updated and clean visual studio 2022 toolchain, without touching the Intel sources, produced with zero warnings. Absolutely clean. kind regards R. btw. Delphi 12 with FMM5 and enhanced Move, FillChar and Pos will solve everything!
  4. RDP1974

    faster json library

    hi, I see many json libraries available, perhaps somebody knows which is the faster/reliable for a intensive server app? seems very good the https://github.com/grijjy/GrijjyFoundation Grijjy base json bson? any feedback?
  5. RDP1974

    TDICTIONARY

    hi, do you know if https://docwiki.embarcadero.com/Libraries/Sydney/en/System.Generics.Collections.TDictionary.Remove remove method will dispose an inserted record automatically?
  6. RDP1974

    TDICTIONARY

    thanks for explain
  7. RDP1974

    TDICTIONARY

    I was wondering about use a record instead of a class or a object if add will call a mem place for the record of maybe if we should use New and Dispose on remove probably is better stay with a basic class creation and disposal the doc is unclear, if remove dispose the loaded struct or should be done manually
  8. RDP1974

    IPC named pipes

    do you know if it is possible to setup a IPC named pipe into one PC act as sender, and a named pipe into another PC act as receiver (within the same windows workgroup or ad subnet) if yes can you suggest components available? If I don't mind firewall permits this communication over the 445 tcp?
  9. RDP1974

    svg

    do you know a high quality SVG library for Delphi? commercial or free is ok thanks
  10. RDP1974

    rubicon 4

    hello, somebody is using rubicon 4 with firedac firebird? the most important question, it's reliable, it's scaling? it's better than firebird embedded sql full text search? thanks
  11. RDP1974

    rubicon 4

    it's reliable?
  12. RDP1974

    NT API components

    do you know commercial components with NT API capabilities? - list the groups and the users of active directory or smb - install remove agents centrally through server admin rights (installing silently software through the lan desktops, without user interaction) ...
  13. RDP1974

    NT API components

    perhaps do you remember the name of the suite? thanks
  14. RDP1974

    twebbrowser capabilities

    hello, I'm wondering if TWebbrowser under android and ios does support webrtc and websocket plz let me know thank you
  15. RDP1974

    virtual printer sdk

    hello, can somebody suggest me a good virtual printer sdk (commercial) with delphi management capability (api, dll, dde or whatever) thank you
  16. hi, I like paste here a little unit helping coders to do scalable I/O http app look, I did an apachebench in a I9 virtualized ubuntu, with 100 concurrent users, asking this text through webbroker and firedac postgres sql query: «Tuttavia, perché voi intendiate da dove sia nato tutto questo errore, di quelli che incolpano il piacere ed esaltano il dolore, io spiegherò tutta la questione, e presenterò le idee espresse dal famoso esploratore della verità, vorrei quasi dire dal costruttore della felicità umana. Nessuno, infatti, detesta, odia, o rifugge il piacere in quanto tale, solo perché è piacere, ma perché grandi sofferenze colpiscono quelli che non sono capaci di raggiungere il piacere attraverso la ragione; e al contrario, non c'è nessuno che ami, insegua, voglia raggiungere il dolore in se stesso, soltanto perché è dolore, ma perché qualche volta accadono situazioni tali per cui attraverso la sofferenza o il dolore si cerca di raggiungere un qualche grande piacere. Concentrandoci su casi di piccola importanza: chi di noi intraprende un esercizio ginnico, se non per ottenerne un qualche vantaggio? E d'altra parte, chi avrebbe motivo di criticare colui che desidera provare un piacere cui non segua nessun fastidio, o colui che fugge un dolore che non produce nessun piacere? Al contrario, però, noi con indignazione denunciamo e riteniamo meritevoli di odio quelli che, rammolliti e corrotti dai piaceri del momento, accecati dal desiderio, non prevedono a quali dolori e a quali sofferenze andranno incontro, e uguale colpa hanno quelli che abbandonano i propri doveri per pigrizia d'animo, cioè per evitare le fatiche e i dolori. Certamente è facile e rapido distinguere questi casi. Infatti nel tempo libero, quando abbiamo tutta la nostra possibilità di scegliere e niente ci ostacola dal fare ciò che ci piace di più, bisogna accogliere ogni piacere e respingere ogni dolore. Ma in altri momenti, o nei doveri inevitabili o negli obblighi che ci vengono dalle circostanze, spesso accadrà che si debba respingere il piacere e accogliere il fastidio. E così il saggio si regola scegliendo tra questi atteggiamenti, facendo in modo che o – respingendo il piacere – ne ottenga di più grandi, o – sopportando il dolore – ne eviti di peggiori.» calling an Apache2 module webbroker the system raw performances are impressive, producing 18000 (18 thousands) sustained http requests for sec pgsql local limits 1000, ssl off put PhysPG with libpq.so in lib path over the datamodule here the unit to use, before you can set this on webbroker source begin {$IFDEF MSWINDOWS} CoInitFlags := COINIT_MULTITHREADED; {$ENDIF} Web.ApacheApp.InitApplication(@GModuleData); Application.Initialize; Application.MaxConnections:=1000; Application.WebModuleClass := WebModuleClass; Application.Run; end. the unit to interface pooled pg unit PGPool; interface uses {$IFDEF WINDOWS} Windows, FireDAC.VCLUI.Wait, {$ENDIF} Classes, System.SysUtils, // FireDAC.Phys.PG, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt, FireDAC.Comp.DataSet, FireDAC.Comp.Client; type TDB = class public DBC: TFDConnection; DBQ: TFDQuery; DBT: TFDTransaction; constructor Create; destructor Destroy; override; end; implementation procedure InitPool; var oParams: TStrings; begin oParams := TStringList.Create; oParams.Add('DriverID=PG'); oParams.Add('User_Name=USERNAME'); oParams.Add('Server=ADDRESS'); oParams.Add('Password=PASSWORD'); oParams.Add('Database=DBNAME'); // oParams.Add('CharacterSet=none'); oParams.Add('Pooled=True'); oParams.Add('POOL_CleanupTimeout=3600000'); oParams.Add('POOL_ExpireTimeout=600000'); oParams.Add('POOL_MaximumItems=1000'); FDManager.Close; while FDManager.State <> dmsInactive do Sleep(1); FDManager.Open; FDManager.AddConnectionDef('PG_Pooled', 'PG', oParams); oParams.Free; end; constructor TDB.Create; begin inherited; // init connection DBC := TFDConnection.Create(nil); DBC.ConnectionDefName := 'PG_Pooled'; DBC.LoginPrompt := False; DBC.FetchOptions.Unidirectional := True; DBC.UpdateOptions.RequestLive := False; DBC.Transaction := DBT; // init transaction DBT := TFDTransaction.Create(nil); DBT.Connection := DBC; // init query DBQ := TFDQuery.Create(nil); DBQ.Connection := DBC; DBQ.Transaction := DBT; DBQ.FetchOptions.Unidirectional := True; DBQ.UpdateOptions.RequestLive := False; DBC.Connected := True; end; destructor TDB.Destroy; begin DBQ.Free; DBT.Free; DBC.Free; inherited; end; initialization InitPool; end. eg. with TDB.Create do begin try DBQ.SQL.Text := 'select * from table'; DBQ.Open; while not DBQ.eof do begin S := S + DBQ.FieldByName('test').asString + '<br>' + FormatDateTime('ddmmyyyy hh:nn:ss', Now) + '<br>'; DBQ.Next; end; finally Free; end; end; kind regards R.
  17. RDP1974

    PGPool Linux Apache top performance Delphi11

    hello, I consider that target a webbroker http app as apache module would have a lot of benefits: the code runs inside the process httpd, using the reliability and the scalability of the apache. I was curious to see the performances of the LLVM Linux compiler in the D11, having done integer tests and some benchmarks, I can tell that's on the level of the windows counterpart. But I can tell you that IIS isapi under Windows produces similar performance results. I have not benchmarked standalone webserver as Indy based webbroker or others, usually used to be managed as reverse proxy. I had liked to share the results with you, seeing how scalable can be a web app inside Linux Apache realm. btw.The unit wants to show how to enable the pooling in Firedac connections. kind regards
  18. RDP1974

    PGPool Linux Apache top performance Delphi11

    somebody ask me php details: php 8.0.11 latest JIT compiler enabled (faster mode as apache module), pooling enabled in php.ini (persistent) open connection query fetch lines close connection <?php // Connecting, selecting database $dbconn = pg_connect("host=localhost dbname=postgres user=postgres password=postgres") or die('Could not connect: ' . pg_last_error()); // Performing SQL query $query = 'SELECT * FROM enter'; $result = pg_query($query) or die('Query failed: ' . pg_last_error()); // Printing results in HTML while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) { foreach ($line as $colvalue) { echo "$colvalue"; } } // Free resultset pg_free_result($result); // Closing connection pg_close($dbconn); ?> delphi apache: Server Software: Apache/2.4.41 Server Hostname: localhost Server Port: 80 Document Path: /test Document Length: 965 bytes Concurrency Level: 100 Time taken for tests: 0.642 seconds Complete requests: 10000 Failed requests: 0 Keep-Alive requests: 9957 Total transferred: 11768106 bytes HTML transferred: 9650000 bytes Requests per second: 15578.10 [#/sec] (mean) Time per request: 6.419 [ms] (mean) Time per request: 0.064 [ms] (mean, across all concurrent requests) Transfer rate: 17902.80 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.2 0 2 Processing: 1 6 6.4 6 175 Waiting: 1 6 6.4 6 175 Total: 1 6 6.5 6 177 Percentage of the requests served within a certain time (ms) 50% 6 66% 6 75% 7 80% 8 90% 10 95% 12 98% 18 99% 25 100% 177 (longest request) php 8 jit: Server Software: Apache/2.4.41 Server Hostname: localhost Server Port: 80 Document Path: /test.php Document Length: 902 bytes Concurrency Level: 100 Time taken for tests: 2.874 seconds Complete requests: 10000 Failed requests: 0 Keep-Alive requests: 9980 Total transferred: 11288500 bytes HTML transferred: 9020000 bytes Requests per second: 3479.01 [#/sec] (mean) Time per request: 28.744 [ms] (mean) Time per request: 0.287 [ms] (mean, across all concurrent requests) Transfer rate: 3835.23 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.2 0 3 Processing: 3 29 2.9 28 53 Waiting: 2 29 2.9 28 53 Total: 3 29 2.9 28 53 Percentage of the requests served within a certain time (ms) 50% 28 66% 29 75% 29 80% 30 90% 31 95% 33 98% 36 99% 41 100% 53 (longest request)
  19. sorry I don't want do cross posting, but don't know how to move this article from database section to this
  20. RDP1974

    PGPool Linux Apache top performance Delphi11

    plz Idera put Delphi Linux LLVM in Professional version too 🙂
  21. RDP1974

    PGPool Linux Apache top performance Delphi11

    100 concurrent users querying pgsql (to see scalability of the stack httpd with db) same setup test done with latest PHP (jit) and pooling enabled is doing 3000 reqs/sec delphi llvm linux apache with pooling 15000 reqs/sec (5x!!! the throughput of the php)
  22. hello, I'm coding a software using webbroker Linux Apache Module and PG pooled Firedac the performances are outstanding hovewer with PG13, libpq 5 on a basic query I get [FireDAC][Phys][PG][libpq] ERROR: relation "name" does not exist any idea how to solve? the FDConnection has in the database field the correct database name thank you I forgot: I use Delphi 11
  23. I forgot: I use Delphi 11 SOLVED was a permission config in pg_hba.conf works perfectly
  24. RDP1974

    Compiler version for Alexandria

    do you know if generated machine win64 code is better than before?
  25. hello, can someone has a function that pass a JSON array string -> to a -> Firedac TFDMemTable thanks
×