#1 2017-03-22 17:41:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Delphi 10.2 Tokyo Compatibility

We are proud to announce compatibility of our mORMot Open Source framework with the latest Delphi 10.2 Tokyo compiler... at least for Win32.

Regression tests for Win32:

   Synopse mORMot Framework Automated tests
  ------------------------------------------


1. Synopse libraries

 1.1. Low level common:
  - System copy record: 83 assertions passed  1.10ms
  - TRawUTF8List: 130,009 assertions passed  60.43ms
  - TDynArray: 1,082,744 assertions passed  108.65ms
  - TDynArrayHashed: 1,200,629 assertions passed  83.09ms
  - TObjectListHashed: 999,868 assertions passed  228.62ms
  - TSynNameValue: 40,032 assertions passed  5.29ms
  - TObjectDynArrayWrapper: 167,501 assertions passed  15.42ms
  - TObjArray: 2,016 assertions passed  2.57ms
  - Fast string compare: 24 assertions passed  95us
  - IdemPropName: 197 assertions passed  830us
  - Url encoding: 150 assertions passed  2.11ms
  - GUID: 9,007 assertions passed  2.78ms
  - IsMatch: 599 assertions passed  130us
  - Soundex: 35 assertions passed  56us
  - Numerical conversions: 1,125,240 assertions passed  247.25ms
  - crc32c: 290,054 assertions passed  207.20ms
      pas 15.90ms 375.2 MB/s fast 3.13ms 1.8 GB/s sse42 1.34ms 4.3 GB/s
  - Bloom filters: 2,010,072 assertions passed  175.87ms
  - Curr 64: 20,053 assertions passed  1.13ms
  - CamelCase: 11 assertions passed  135us
  - Bits: 4,774 assertions passed  306us
  - Ini files: 7,004 assertions passed  36.58ms
  - UTF8: 134,142 assertions passed  685.25ms
  - Baudot code: 10,007 assertions passed  18.81ms
  - Iso 8601 date and time: 76,021 assertions passed  7.48ms
  - Time zones: 407 assertions passed  13.93ms
  - Url decoding: 1,100 assertions passed  224us
  - Mime types: 30 assertions passed  103us
  - TSynTable: 875 assertions passed  8.78ms
  - TSynCache: 404 assertions passed  207us
  - TSynFilter: 1,005 assertions passed  4.69ms
  - TSynValidate: 677 assertions passed  975us
  - TSynLogFile: 49 assertions passed  464us
  - TSynUniqueIdentifier: 1,300,002 assertions passed  418.78ms
  - TSynDictionary: 119,930 assertions passed  23.06ms
  Total failed: 0 / 8,734,751  - Low level common PASSED  2.37s

 1.2. Low level types:
  - RTTI: 410 assertions passed  1.30ms
  - Url encoding: 200 assertions passed  663us
  - Encode decode JSON: 304,028 assertions passed  84.16ms
  - Variants: 66 assertions passed  105us
  - Mustache renderer: 146 assertions passed  5.05ms
  - TDocVariant: 71,774 assertions passed  107.72ms
  - BSON: 245,053 assertions passed  6.68ms
     100000 TBSONObjectID.ComputeNew in 5.07ms i.e. 19704433/s, aver. 0us
  - TSynTableStatement: 221 assertions passed  293us
  - TSynMonitorUsage: 1,202 assertions passed  235us
  Total failed: 0 / 623,100  - Low level types PASSED  209.41ms

 1.3. Big table:
  - TSynBigTable: 19,234 assertions passed  199.83ms
  - TSynBigTableString: 16,138 assertions passed  105.09ms
  - TSynBigTableMetaData: 475,563 assertions passed  1.14s
  - TSynBigTableRecord: 375,563 assertions passed  1.03s
  Total failed: 0 / 886,498  - Big table PASSED  2.48s

 1.4. Synopse PDF:
  - TPdfDocument: 4 assertions passed  5.18ms
  - TPdfDocumentGDI: 8 assertions passed  58.57ms
  Total failed: 0 / 12  - Synopse PDF PASSED  64.56ms

 1.5. Cryptographic routines:
  - Adler32: 1 assertion passed  701us
  - MD5: 167 assertions passed  384us
  - SHA1: 10 assertions passed  4.26ms
  - SHA256: 18 assertions passed  5.59ms
  - AES256: 18,028 assertions passed  351.34ms
      cypher 1..2409 bytes with AES-NI: 331us, without: 6.07ms
  - RC4: 1 assertion passed  75us
  - Base64: 11,994 assertions passed  92.39ms
  - CompressShaAes: 1,683 assertions passed  2.78ms
  - TAESPNRG: 17,303 assertions passed  45.04ms
  - CryptDataForCurrentUser: 6,000 assertions passed  508.07ms
     2000 AES-CFB in 7.72ms i.e. 258765/s, aver. 3us, 134.9 MB/s
     2000 DPAPI in 497.42ms i.e. 4020/s, aver. 248us, 2.1 MB/s
  - JWT: 184,622 assertions passed  643.68ms
     10000 HS256 in 31.13ms i.e. 321181/s, aver. 3us
     100 ES256 in 260.84ms i.e. 383/s, aver. 2.60ms
  Total failed: 0 / 239,827  - Cryptographic routines PASSED  1.65s

 1.6. ECC cryptography:
  - Reference vectors: 17 assertions passed  9.93ms
  - ecc_make_key: 50 assertions passed  106.34ms
  - ecdsa_sign: 50 assertions passed  108.82ms
  - ecdsa_verify: 50 assertions passed  131.25ms
  - ecdh_shared_secret: 147 assertions passed  221.13ms
  - Certificates and signatures: 91 assertions passed  86.32ms
  - ECC command line tool: 118 assertions passed  318.45ms
  - ECDHE stream protocol: 521,295 assertions passed  590.84ms
  Total failed: 0 / 521,818  - ECC cryptography PASSED  1.57s

 1.7. Compression:
  - In memory compression: 12 assertions passed  401.89ms
  - GZIP format: 19 assertions passed  765.16ms
  - ZIP format: 91 assertions passed  3.39s
  - SynLZO: 3,006 assertions passed  185.72ms
  - SynLZ: 30,217 assertions passed  537.95ms
  Total failed: 0 / 33,345  - Compression PASSED  5.29s

 1.8. Protocols:
  - RTSP over HTTP: 1,900 assertions passed  294.88ms
  Total failed: 0 / 1,900  - Protocols PASSED  295.61ms


2. mORMot

 2.1. File based:
  - Database direct access: 20,259 assertions passed  120.64ms
  - Virtual table direct access: 12 assertions passed  9.00ms
  - TSQLTableJSON: 149,076 assertions passed  91.93ms
  - TSQLRestClientDB: 615,200 assertions passed  2.78s
  - Regexp function: 6,016 assertions passed  54.46ms
  - TRecordVersion: 20,060 assertions passed  131.39ms
  Total failed: 0 / 810,623  - File based PASSED  3.19s

 2.2. File based memory map:
  - Database direct access: 20,254 assertions passed  104.64ms
  - Virtual table direct access: 12 assertions passed  8.07ms
  - TSQLTableJSON: 149,076 assertions passed  74.78ms
  - TSQLRestClientDB: 615,199 assertions passed  3.04s
  - Regexp function: 6,016 assertions passed  54.96ms
  - TRecordVersion: 20,060 assertions passed  107.36ms
  Total failed: 0 / 810,617  - File based memory map PASSED  3.39s

 2.3. File based WAL:
  - Database direct access: 20,259 assertions passed  130.21ms
  - Virtual table direct access: 12 assertions passed  7.07ms
  - TSQLTableJSON: 149,076 assertions passed  79.95ms
  - TSQLRestClientDB: 615,200 assertions passed  2.70s
  - Regexp function: 6,016 assertions passed  26.63ms
  - TRecordVersion: 20,060 assertions passed  102.81ms
  Total failed: 0 / 810,623  - File based WAL PASSED  3.05s

 2.4. Memory based:
  - Database direct access: 20,254 assertions passed  77.98ms
  - Virtual table direct access: 12 assertions passed  5.76ms
  - TSQLTableJSON: 149,076 assertions passed  68.34ms
  - TSQLRestClientDB: 683,507 assertions passed  3.63s
  - Regexp function: 6,016 assertions passed  58.11ms
  - TRecordVersion: 20,060 assertions passed  105.03ms
  - RTree: 140,000 assertions passed  615.19ms
  - Shard write: 10,602 assertions passed  249.68ms
  - Shard read: 140,001 assertions passed  268.40ms
  - Shard read after purge: 114,003 assertions passed  184.11ms
  - MaxShardCount: 144,002 assertions passed  204.41ms
  Total failed: 0 / 1,427,533  - Memory based PASSED  5.47s

 2.5. Basic classes:
  - TSQLRecord: 88 assertions passed  307us
  - TSQLRecordSigned: 200 assertions passed  5.56ms
  - TSQLModel: 16 assertions passed  150us
  - TSQLRestServerFullMemory: 1,222,461 assertions passed  844.56ms
  Total failed: 0 / 1,222,765  - Basic classes PASSED  852.30ms

 2.6. Client server access:
  - TSQLHttpServer: 2 assertions passed  10.93ms
     using HTTP API 2.0
  - TSQLHttpClient: 3 assertions passed  31.11ms
     using TSQLHttpClientWinHTTP
  - HTTP client keep alive: 3,087 assertions passed  210.22ms
     4818 B, first 2.78ms, done 195.62ms i.e. 5111/s, aver. 195us, 23.9 MB/s
  - HTTP client multi connect: 3,087 assertions passed  208.70ms
     4818 B, first 350us, done 197.86ms i.e. 5053/s, aver. 197us, 23.6 MB/s
  - HTTP client encrypted: 3,087 assertions passed  215.98ms
     4818 B, first 352us, done 204.58ms i.e. 4887/s, aver. 204us, 22.8 MB/s
  - Named pipe access: 3,089 assertions passed  631.25ms
     4818 B, first 248.60ms, done 148.03ms i.e. 6755/s, aver. 148us, 31.5 MB/s
  - Local window messages: 3,088 assertions passed  23.67ms
     4818 B, first 82us, done 18.60ms i.e. 53746/s, aver. 18us, 251.3 MB/s
  - Direct in process access: 3,056 assertions passed  22.48ms
     4818 B, first 20us, done 12.68ms i.e. 78827/s, aver. 12us, 368.5 MB/s
  - HTTP several DB servers: 9,604 assertions passed  687.56ms
     4818 B, first 335us, done 190.21ms i.e. 5257/s, aver. 190us, 24.5 MB/s
     4818 B, first 347us, done 191.53ms i.e. 5221/s, aver. 191us, 24.4 MB/s
     4818 B, first 329us, done 190.51ms i.e. 5248/s, aver. 190us, 24.5 MB/s
  Total failed: 0 / 28,103  - Client server access PASSED  2.04s

 2.7. Service oriented architecture:
  - Weak interfaces: 56 assertions passed  890us
  - Service initialization: 267 assertions passed  9.54ms
  - Direct call: 606,543 assertions passed  25.86ms
  - Server side: 606,563 assertions passed  26.40ms
  - Client side REST: 808,751 assertions passed  562.07ms
  - Client side REST as JSON object: 808,745 assertions passed  605.45ms
  - Client side REST sessions stats: 808,745 assertions passed  687.92ms
  - Client side REST locked: 808,749 assertions passed  577.72ms
  - Client side REST main thread: 808,749 assertions passed  1.65s
  - Client side REST background thread: 808,749 assertions passed  1.27s
  - Client side REST weak authentication: 808,745 assertions passed  556.23ms
  - Client side REST basic authentication: 808,745 assertions passed  710.11ms
  - Client side REST custom record layout: 808,745 assertions passed  592.22ms
  - Client side REST service log to DB: 808,745 assertions passed  2.62s
  - Client side JSONRPC: 808,745 assertions passed  617.91ms
  - Test over HTTP: 10,980 assertions passed  494.10ms
  - Security: 139 assertions passed  1.41ms
  - Mocks and stubs: 30,032 assertions passed  33.29ms
  Total failed: 0 / 10,150,793  - Service oriented architecture PASSED  11.06s

 2.8. Bidirectional remote connection:
  - Websockets JSON protocol: 60 assertions passed  369us
  - Websockets binary protocol: 240 assertions passed  160us
  - Run http server: 2 assertions passed  2.60ms
  - SOA callback on server side: 4,578 assertions passed  4.05ms
  - SOA callback via JSON websockets: 4,581 assertions passed  102.21ms
  - SOA callback via binary websockets: 4,581 assertions passed  112.90ms
  - TRecordVersion: 20,068 assertions passed  124.08ms
  Total failed: 0 / 34,110  - Bidirectional remote connection PASSED  348.48ms

 2.9. External database:
  - TQuery: 2,003 assertions passed  33.23ms
  - SynDBRemote: 30,095 assertions passed  289.21ms
  - DB properties persistence: 7 assertions passed  6.92ms
  - External records: 2 assertions passed  253us
  - Auto adapt SQL: 942 assertions passed  58.78ms
  - Crypted database: 253,276 assertions passed  183.61ms
  - External via REST: 170,355 assertions passed  708.54ms
  - External via virtual table: 170,355 assertions passed  2.46s
  - External via REST with change tracking: 180,455 assertions passed  4.09s
  - JET database: 7,007 assertions passed  660.22ms
  Total failed: 0 / 814,497  - External database PASSED  8.50s

 2.10. Multi thread process:
  - Create thread pool: 1 assertion passed  12.43ms
  - TSQLRestServerDB: 4,822 assertions passed  294.07ms
     1=11223/s  2=13336/s  5=10068/s  10=7865/s  30=5861/s  50=7658/s
  - TSQLRestClientDB: 4,822 assertions passed  246.70ms
     1=12704/s  2=12899/s  5=8256/s  10=9811/s  30=12911/s  50=8042/s
  - TSQLRestClientURINamedPipe: 2,412 assertions passed  1.63s
     1=1316/s  2=822/s  5=645/s
  - TSQLRestClientURIMessage: 3,222 assertions passed  226.97ms
     1=7045/s  2=7823/s  5=9100/s  10=7712/s
  - Windows API: 4,822 assertions passed  594.99ms
     1=3570/s  2=3976/s  5=4186/s  10=4768/s  30=4796/s  50=4464/s
  - Socket API: 4,822 assertions passed  422.08ms
     1=6673/s  2=6144/s  5=5357/s  10=5834/s  30=7234/s  50=5321/s
  - Websockets: 4,822 assertions passed  589.10ms
     1=6554/s  2=5213/s  5=5017/s  10=5580/s  30=4096/s  50=2215/s
  - Locked: 4,822 assertions passed  263.27ms
     1=12945/s  2=10332/s  5=9225/s  10=10578/s  30=10281/s  50=6690/s
  - Unlocked: 4,822 assertions passed  275.37ms
     1=12799/s  2=7813/s  5=10428/s  10=8342/s  30=10069/s  50=7664/s
  - Main thread: 4,822 assertions passed  361.93ms
     1=11627/s  2=5314/s  5=6498/s  10=6605/s  30=7601/s  50=7421/s
  - Background thread: 4,822 assertions passed  394.31ms
     1=12149/s  2=8718/s  5=7561/s  10=4774/s  30=4387/s  50=5447/s
  Total failed: 0 / 49,033  - Multi thread process PASSED  5.33s

 2.11. DDD shared units:
  - User model: 3,276 assertions passed  429us
  - Authentication model: 20,006 assertions passed  69.33ms
  - Email validation process: 55 assertions passed  34.69ms
  - User CQRS repository: 57,106 assertions passed  361.38ms
  Total failed: 0 / 80,443  - DDD shared units PASSED  467.02ms

 2.12. DDD multi thread:
  - Delete old database: 1 assertion passed  1.42ms
  - Start server: 1 assertion passed  8.65ms
  - Single client test: 1,002 assertions passed  195.11ms
  - Multi threaded clients test: 21 assertions passed  114.94ms
  Total failed: 0 / 1,025  - DDD multi thread PASSED  321.70ms


Using mORMot 1.18.3538 FTS3
Running on Windows 7 64bit SP1 (6.1.7601) with code page 1252
TSQLite3LibraryStatic 3.17.0 with internal MM
Generated with: Delphi 10.2 Tokyo compiler

Time elapsed for all tests: 58.07s
Tests performed at 22/03/2017 18:31:55

Total assertions failed for all test suits:  0 / 27,281,416
! All tests passed successfully.

For Win64, the compilation went well... but the IDE was stuck!
By using the command line compiler, we had the same behavior:
U48gJs.jpg

Pretty weird for a just released compiler....
sad

Could anyone attempt in his own Delphi installation?

Offline

#2 2017-03-22 18:39:54

Fritz
Member
Registered: 2015-05-08
Posts: 13

Re: Delphi 10.2 Tokyo Compatibility

Yes for me there is the same problem....
But my subscription is ending on 03/24/2017 so i think i will not investigate further. They will not fix bugs without subscription and i don't like to pay for bugfixing. Wish i can do the same with our clients........

Offline

#3 2017-03-22 19:50:58

Amir
Member
From: UAE
Registered: 2010-08-17
Posts: 36

Re: Delphi 10.2 Tokyo Compatibility

Hi all
Could any one witness any compiled-code performance enhancements in comparison with previous versions (10-10.1.x) !!??
At least in Win32 compiler, as for Win64 the compilation process always fails as noticed..

And dear Arnaud,
It would be very thankful if you let us know about the quality of generated code with the very new LLVM-based Linux compiler, as I remembered, you mentioned somewhere the final generated code produced using Delphi mobile compilers are not so optimized; may be due to unqualified settings applied to the LLVM-backend...
I'd like to know if this new server-support-release also suffers from the same performance issue !!??

Thanks in advance.

Last edited by Amir (2017-03-22 20:03:24)


Amir

Offline

#4 2017-03-22 20:16:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Delphi 10.2 Tokyo Compatibility

Win32 performance is the same as with previous compilers.

Offline

#5 2017-03-23 02:14:57

cybexr
Member
Registered: 2016-09-14
Posts: 81

Re: Delphi 10.2 Tokyo Compatibility

Performance much better than my enviorment(FPC win32 @ i5-5200 cpu& SSD  ), I've create a repo for mormot-test-result, see https://github.com/cybexr/mormot-benchmark, and welcome everyone commit your result.

The solution we planned is a mormot-based SAAS cloud running on amazon AWS-EC2, so about the test-result, we mainly focused on FPC targeting linux, but any result-log is welcome.

Offline

#6 2017-03-23 10:06:50

hnb
Member
Registered: 2015-06-15
Posts: 290

Re: Delphi 10.2 Tokyo Compatibility

I suppose that we have no plans to go for ARC Delphi compiler for Linux (which is only for Enterprise+ editions even for RAD Studio ... yikes).

Last edited by hnb (2017-03-23 10:16:18)


best regards,
Maciej Izak

Offline

#7 2017-03-23 14:03:11

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Delphi 10.2 Tokyo Compatibility

No plan at all.

We best focus on FPC, for sure!

Offline

#8 2017-03-27 03:14:29

kevind7
Member
Registered: 2015-04-14
Posts: 1

Re: Delphi 10.2 Tokyo Compatibility

Thanks Arnaud for raising the issue on Jira at https://quality.embarcadero.com/browse/RSP-17138.
We are relying on mORMot for a number of our server side projects so the 64 bit issue has just pulled our upgrade to Tokyo to a halt.

Offline

#9 2017-03-27 06:54:22

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Delphi 10.2 Tokyo Compatibility

Yes, hope they found out their regression.

Offline

#10 2017-03-28 13:20:47

ubaltino
Member
From: Brasil
Registered: 2014-05-23
Posts: 24
Website

Re: Delphi 10.2 Tokyo Compatibility

The same thing is happening with me. For windows 64bit hangs.
If you find a solution.


Ubaltino Faleiro
www.sistemainteligente.com
Brasil - Goiás - Goiânia

Offline

#11 2017-03-28 14:12:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Delphi 10.2 Tokyo Compatibility

I'm afraid the solution is not in mORMot's code itself...
It is a compiler issue.

We may try to split the mORMot.pas unit into smaller pieces - but even this may not be enough.
And Delphi 6 - from decades ago - is able to compile it, so I don't see any reason to circumvent such a nasty compiler bug...

It is up to Embarcadero, now...

You may vote for the issue, and let other people vote...
And in the meanwhile, use an older revision of the compiler...
sad
Note that the cross-platform client units works under Win64 - but of course, only as clients...

Offline

#12 2017-03-28 17:55:23

ubaltino
Member
From: Brasil
Registered: 2014-05-23
Posts: 24
Website

Re: Delphi 10.2 Tokyo Compatibility

I was able to compile for windows 64 bit.
What did I do?
In the project options, in "Code Generation" I changed "Code inlining control" from On to Off.
Compile without crashing.
I hope you can reproduce there.


Ubaltino Faleiro
www.sistemainteligente.com
Brasil - Goiás - Goiânia

Offline

#13 2017-03-29 10:25:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Delphi 10.2 Tokyo Compatibility

Very nice finding, ubaltino!

We were able to disable inlining for Tokyo + Win64 only.
See https://synopse.info/fossil/info/dc91e85d39

Of course, this is just a workaround, and may slightly reduce the performance: we expect a true compiler fix from Embarcadero!

Offline

#14 2017-05-04 06:13:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Delphi 10.2 Tokyo Compatibility

Embarcadero just released a hotfix update for Delphi 10.2 Tokyo: now the Win64 compiler is fixed!
See https://goo.gl/2NGWNx

Thanks for the reactivity!

Offline

Board footer

Powered by FluxBB