Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

mORMot is breaking the rules #7692

Closed
Closed

Activity

  1. joanhey commented on Nov 12, 2022

    @joanhey
    ContributorAuthor

    @pavelmash
    We all know how to do it so.

  2. joanhey commented on Nov 12, 2022

    @joanhey
    ContributorAuthor

    image

    image

    image

    Sorry !! 👀

  3. joanhey commented on Nov 12, 2022

    @joanhey
    ContributorAuthor

    @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.

  4. pavelmash commented on Nov 12, 2022

    @pavelmash
    Contributor

    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.

  5. added a commit that references this issue on Nov 12, 2022
    4e888f4
  6. synopse commented on Nov 12, 2022

    @synopse

    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.

  7. synopse commented on Nov 12, 2022

    @synopse

    @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.

  8. joanhey commented on Nov 12, 2022

    @joanhey
    ContributorAuthor

    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.

  9. joanhey commented on Nov 12, 2022

    @joanhey
    ContributorAuthor

    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.

  10. joanhey commented on Nov 12, 2022

    @joanhey
    ContributorAuthor

    image

    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.

  11. synopse commented on Nov 12, 2022

    @synopse

    That is a strange behavior we try to fix, indeed.
    But the test code is fair and doesn't break any rule.

  12. added a commit that references this issue on Jan 29, 2024
    bae54c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions