You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Constant with fortunes table content is under {$ifdef USE_SQLITE3} condition - it's used ONLY for filling SQLITE3 database what we use for testing. For TFB tests app is compiled without -dUSE_SQLITE3, so this lines is not used at all. But you are right - it's confused a little - I will remove it.
JSON serialization is slower compared to db because we spawn threads = 4*CPU count and there is indeed problems with scalability in our HTTP server implementation - we working on it.
This is clearly a false positive. @joanhey is wrong about his/her guess. This fixed array is used for GenerateDB below which is NOT for the fortunes test.
The fortunes tests are implemented either in TRawAsyncServer.fortunes or TRawAsyncServer.rawfortunes and both use clearly a TDynArray dynamic list.
Please look at the exact code, not making wild guesses.
@nbrady-techempower I think that it's necessary to add a test, than any fw that is faster using any db test vs json will not pass the test.
Yes, but with a real margin.
The fact that /json is somewhat slower than /db or /fortunes is that the mormot HTTP server becomes a bottleneck with a lot of cores, as @pavelmash stated.
Something +/- 10% is not a good indication of being actually slower.
With the plaintext 2,333,124 req/s and with json 320,078 req/s.
If the json encoder is slow also will be with the 1 query, because need to be converted to json too.
I like all the fast frameworks from any language, but we try to check suspicious things.
To have a fair play in the benchmark.
And also to help checking strange behaviours, to the creators of the frameworks.
Activity
joanhey commentedon Nov 12, 2022
@pavelmash
We all know how to do it so.
joanhey commentedon Nov 12, 2022
Sorry !! 👀
joanhey commentedon Nov 12, 2022
@nbrady-techempower
I think that it's necessary to add a test, than any fw that is faster using any db test vs json will not pass the test.
pavelmash commentedon Nov 12, 2022
Constant with fortunes table content is under {$ifdef USE_SQLITE3} condition - it's used ONLY for filling SQLITE3 database what we use for testing. For TFB tests app is compiled without -dUSE_SQLITE3, so this lines is not used at all. But you are right - it's confused a little - I will remove it.
JSON serialization is slower compared to db because we spawn threads = 4*CPU count and there is indeed problems with scalability in our HTTP server implementation - we working on it.
[mORMot] remove SQLite-specific code from test sources to prevent pos…
synopse commentedon Nov 12, 2022
This is clearly a false positive.
@joanhey is wrong about his/her guess. This fixed array is used for
GenerateDBbelow which is NOT for the fortunes test.The fortunes tests are implemented either in
TRawAsyncServer.fortunesorTRawAsyncServer.rawfortunesand both use clearly aTDynArraydynamic list.Please look at the exact code, not making wild guesses.
synopse commentedon Nov 12, 2022
Yes, but with a real margin.
The fact that /json is somewhat slower than /db or /fortunes is that the mormot HTTP server becomes a bottleneck with a lot of cores, as @pavelmash stated.
Something +/- 10% is not a good indication of being actually slower.
joanhey commentedon Nov 12, 2022
I don't know Pascal, like more people.
But I still think that it's better to delete this constant from the code.
About the difference between json and db, it's very strange.
And naturally looks suspicious, without a clarification.
joanhey commentedon Nov 12, 2022
It's not about 10% difference between json and db.
All frameworks that have ~300K req/s with 1 query, have about 1 million req/s with json.
But mORMmot is the first fw than have less.
joanhey commentedon Nov 12, 2022
With the plaintext 2,333,124 req/s and with json 320,078 req/s.
If the json encoder is slow also will be with the 1 query, because need to be converted to json too.
I like all the fast frameworks from any language, but we try to check suspicious things.
To have a fair play in the benchmark.
And also to help checking strange behaviours, to the creators of the frameworks.
synopse commentedon Nov 12, 2022
That is a strange behavior we try to fix, indeed.
But the test code is fair and doesn't break any rule.
mORMot: use SQL pipelining for /query in raw test (TechEmpower#7678)