TYPO3 API Benchmark

Six ways to serve the same TYPO3 records as JSON

tca_api, t3api, sg_apicore and nnrestapi against hand-written endpoints on the core Record API and Extbase. Every API runs from its own package with its own cache switched on, is load-tested cold and cached, and counted in lines of configuration.

Performance

Every request of a pass hits a different URL. Cold is the first pass after flushing all caches, so every response is built from the database. Cached requests the same URLs again. Values are medians over all repetitions.

Configuration needed

Everything in each API's package except composer.json, in non-empty lines, plus configuration the project has to add outside the package.

Method and limits

How it is measured

    What to keep in mind

    • One machine runs PHP, the database and the load generator, with no network latency to the database. Absolute numbers will differ on a server; compare the APIs, not the values. On a remote database every additional query costs a round trip, so per-row loading falls further behind.
    • Payloads differ: tca_api and t3api return Hydra JSON-LD with @id, @type and pagination links; sg_apicore leaves out categories; nnrestapi returns published as a Unix timestamp.
    • One dataset: 10,000 articles, 2,000 authors, 300 organizations, 25 countries, 15 tags and 8 categories; 2–4 tags and 1–3 categories per article.
    • Each package is written the way its API documents it. Where an API cannot do part of the task, the gap is shown instead of worked around.

    Reproduce

    ddev start && ddev composer install
    bin/env prod
    bin/bench load
    bin/bench footprint
    bin/bench site