Jump to content

RDPasqua

Members
  • Content Count

    36
  • Joined

  • Last visited

Community Reputation

15 Good

2 Followers

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. if you wish check this project https://github.com/fredvs/mselang compiler very well written, clean, fast code, based on LLVM still lack a framework as vcl or fmx
  2. ok, we can do a fund-raising project, buy Island, then will ask to Sergey to do a FMX similar layer over it, for windows, osx, android and ios. I stop here else embarcadero will kill me 🙂 (just for fun)
  3. I have idea, before Delphi fail, buy Island LLVM from RemObjects, they have already a Delphi RTL compatible. Bind VCL and or FMX over it and have all OS, all platforms, clean, fast, perfect code. Open source it as MS do with Roslyn?
  4. sorry, give me some time bcz have a new idea
  5. RDPasqua

    TIdSSLIOHandlerSocketOpenSSL and TLS 1.3 ?

    https://github.com/winddriver/Delphi-Cross-Socket here you can found headers and units of MBED_TLS Delphi bound, an embedded $L high quality library that can replace openssl
  6. at runtime, just add in webbroker app a unit uses clause that contains a little class helper with a pair of methods, I'll describe all how-to
  7. ok I'll publish soon on github for our beloved Delphi users Doing little changes in ISAPI, still a preferable way to publish a Web/Rest/MVC application, for security and performances Now, I did a test with a text file of 1.2MB, similar as the actual Json blobs I/O verbose content 100 concurrent users Without compression: 490 req/sec With System.Zlib deflate zcFastest mode: 170 req/sec With my libs: 730 req/sec 409192.73 [Kbytes/sec] so in origin around 1GB/sec compression in realtime Lowering the bandwidth needed, and with full CPU acceleration, we get a better throughput pages/sec with less than half of the size moved. Will publish soon on github files and how/to. This can be cool for WebBroker, Mars, DMVC, Daraja, DataSnap ISAPI... (btw. will publish a ISAPI filter ultra rapid, so coders can avoid to manage compression in their app code)
  8. Hello. Do you have experience with Json libs around there, can I ask what is the faster with low print and truly reliable? Thank you
  9. RDPasqua

    pixel-perfect bitmap FMX app

    ok, I'm used to deploy SDL2 under arm embedded, it's not for speed, but to obtain high quality bitmap based surfaces under FMX. IMHO Fmx should implement methods to do direct canvas drawing without scale, in a easy way, as TGraphics32 for example.
  10. RDPasqua

    Rapid generics

    I know than in Rio10.3.1 generics was enhanced, perhaps somebody knows if the generics of Dmitry are still faster? https://github.com/d-mozulyov/Rapid.Generics
  11. I have investigate to patch system.zlib, works but can be suceptible of errors on version zlib changing, in older Delphi, in future, const and struct can change. So I prefer an external approach. I'll do an example how to deflate with webbroker. Will do a proxy transport for datasnap, and one for Indy. Other source code as CrossWebSocket and the dozen around can use directly the api, outside from system.zlib. I did a test on a single thread I7, a blob of 1Mb of text, 100 compress: System.Zlib zcFastest 1800msec Sea Zlib 500msec will post soon all on a github
  12. Hi Andrea, about SQL slow results, sounds like you can have a pair of bottlenecks: 1) zlib gzip or deflate massive cpu taking 2) serialized SQL access 3) slow json 4) files should use TransmitFile API with kernel cache How to solve: 1) please can you do a test disabling HTTP compression, so we will see if this is the bottleneck 2) I'll upload a new Zlib 5x faster than the system default on single core, please wait I finish to adapt to Delphi RTL 3) please use Firedac FDManager POOLING set to true, and making your connection use it (so in the thread you will do connection create, transaction create, query create, SQL, free, free, free): you will save the time of connection that usually can be also 250-1000msec; in the query use UNIDIRECTIONAL true readonly for selects, and LIVE false, CACHED false, use indexes and plan analyzer 4) avoid to use a single connection with shared queries over it 5) you can accelerate further doing your pooling, use a threadvar: class DBPool FConn: FDConnection FTrans: FDTranscation FQuery: FDQuery theadvar MyPool:DBPool; threadvar PoolEnabled:boolean=false; inside the method do a check before ask SQL; if not PoolEnabled do begin Fconn.create FTrans.create Fquery.create PoolEnabled:=True end; then in your SQL simply use MyPool.FQuery.SQL.Text().ExecSql or Open,Close, this is the fastest method because the thread where you are already has a connection, transaction, query ready, you don't need create, and don't need destroy ... tell me if you need further info 6) use stored procedures for complex query 7) use a fast Json library, as for example the excellent https://blog.grijjy.com/2017/01/30/efficient-and-easy-to-use-json-and-bson-library/ 12x faster pls let me know with those changes the results thank you btw. you can use a profiler to see where the cpu time is most used, maybe the sql cannot throughput more than this 🙂
  13. I can do it, or try yourself to do: gettickcount tparallel.for 1000000 function to test gettickount- previous gettickount then rem or use RDPMM64 anyway bench a real application, as a webserver, as I did, is producing a better idea of the real gain
  14. ok I have built CompareMem version, but is faster the Delphi RTL version; CompareText too, has similar results, so I have erased these two functions from the RDPSimd64 avoiding to bind Math and SysUtils Pos seems to work ok now, ansi, wide and unicode. Now with MM, Move, FillChar, Zeromemory and Pos, apachebench ab -n 100000 -c 100 -k -r http://192.168.1.124:8000/hello (100 concurrent http clients), is jumping from ~22-25k ops/sec to ~100k ops/sec (Windows 2016 server: VMware guest 8 virtual cores into I7 quad core host) Server Software: CrossHttpServer/2.0 Server Hostname: 192.168.1.166 Server Port: 8000 Document Path: /hello Document Length: 11 bytes Concurrency Level: 100 Time taken for tests: 0.985 seconds Complete requests: 100000 Failed requests: 0 Keep-Alive requests: 100000 Total transferred: 14200000 bytes HTML transferred: 1100000 bytes Requests per second: 101502.13 [#/sec] (mean) Time per request: 0.985 [ms] (mean) Time per request: 0.010 [ms] (mean, across all concurrent requests) Transfer rate: 14075.49 [Kbytes/sec] received TBB and IPP seems very delicate about memory errors, so for example a third-party component I have tested is producing exceptions (should be a double free or a buffer overrun). Pos in IPP was behaving differently from Delphi RTL version, managing also negative values, now should be ok. Resuming, try it with your components and let me know the results. Also please let me know if I did errors on the source code or if you trap exceptions. Thank you. Roberto Btw. tested with RIO 10.3.1 (Delphi 64bit) (I will send also Zlib 5x faster for HTTP compression) RDPINTELPas.zip
  15. I should try to do builds using CLANG, for TBB should have no trobles, we will have a OBJ to link inside, but for IPP I suppose there will be a license problem, need read the license
×