Skip to content
Muhammet Şafak
tr

Research

last updated:

Deep Research and Measurement

A claim that rests on neither a source nor a number is a preference. This page is where my research lives: which question I chased, how I went at it, what I found and how far I trust it.

5
programmes
10
records
9
measurements
3
sources

How do I arrive at a finding?

Research is worth something when it can be repeated. A set of rules governs what I publish here; a record that breaks one of them does not go up.

  1. 01

    The record carries its provenance

    In a measurement: hardware, versions and configuration go into the environment block.

    In an analysis: every source is listed with its title, address and access date.

  2. 02

    One instance is not evidence

    In a measurement: a single run is not a measurement; the repeat count and the reported value are stated.

    In an analysis: a single source is not a finding; a claim is met with at least two independent ones.

  3. 03

    Evidence is linked

    In a measurement: raw data is linked at a downloadable address and the repeat command is given.

    In an analysis: each source gets its own address; a quotation is linked, not paraphrased.

  4. 04

    Negative results are published too

    A result that fails to confirm the expectation is still a result. An unpublished finding is research that never happened.

Featured record

Database & queries Measurement

A partial index makes a queue table forty-one times smaller — for as long as the planner picks it

On a Postgres queue table with millions of dead rows, what does a partial index buy, and when does the planner refuse to use it?

Finding

At 10 million dead rows a partial index sustains 11,537 claims per second where the same table without one manages 7. Against a composite index the throughput difference is small (6.9%) but the size difference is not: 7.6 MB against 310.4 MB, and the partial one does not grow with the table because it indexes only the 5,000 live rows. None of that is the real finding. The moment the planner switches a prepared statement to a generic plan the partial index stops being used at all — 11,752 tps becomes 7, and 0.68 ms becomes 1.1 seconds. A factor of 1,635. The composite index is untouched under the same conditions.

11,537 tps
Partial index, 10M dead rows
7 tps
Same table, no index
7.6 / 310.4 MB
Index size, partial / composite
High confidence Read the report
Frontend performance Measurement

How you import Chart.js decides how many kilobytes the visitor downloads

In a real production build, what is the difference between `chart.js/auto` and a selective `Chart.register()` — in kilobytes?

Finding

Selective registration saves 9.7 kB gzip over `chart.js/auto` (67.8 → 58.1 kB, 14.3%). The larger drop is not in the library core but in leaving unused controllers out: a page that registers only the bar chart falls to 46.0 kB — two thirds of auto.

58.1 kB
Selective register
67.8 kB
chart.js/auto
46.0 kB
Bar only
High confidence Read the report
Language & runtime Measurement

opcache preload cuts the deploy bill by up to fourteen times — but five of seven frameworks do not hand it to you

With `opcache.preload` on, how long is the first request seven PHP frameworks serve after a deploy, what does the gain cost, and who can actually have it?

Finding

Preload shortens the cold first request by between 3.5× and 14.2×: Symfony drops from 35.58 ms to 2.50 ms, down to Phalcon's bare figure. But only two of the seven candidates — Symfony and CodeIgniter — publish a preload file of their own; for the other five the gain sits on the table waiting for the user to write one. Writing one is not as easy as it looks: a preload generated blindly from the classmap never brings Symfony up at all, and on CodeIgniter it does worse (5.29 ms) than the hand-picked official file (3.13 ms). And the cost does not vanish: Laravel's classmap preload takes the 62 ms it saves each visitor and writes it back as 2,340 ms of php-fpm start-up.

2.50 ms
Symfony, cold first request
2 / 7
Candidates shipping a preload file
+2,340 ms
Laravel classmap, fpm cost
High confidence Read the report
Service & load Measurement

Seven PHP frameworks under identical load: the gap narrows as soon as the request does real work

On the same hardware, the same PHP build and the same seven routes, how many requests a second do Laravel, Symfony, CodeIgniter, Yii2, Phalcon, Laminas and Slim serve, and at what latency?

Finding

On an empty route the fastest is 4.4× the slowest (Slim 25,975, Laravel 5,966 req/s). As soon as the request does real work the gap closes: 3.7× for a single row from the database, 3.5× for twenty rows. Phalcon is third on an empty route and fifth once a query is involved — being a C extension buys nothing while the process waits on MySQL. And the expensive decision is not the framework: Laravel's own default `web` middleware group takes the same response from 5,858 to 2,176 req/s, so one default costs more than most of the distance between the frameworks.

25,975 req/s
Empty route, fastest
5,966 req/s
Empty route, slowest
4.4× → 3.7×
Gap: empty route → database
Medium confidence Read the report

6 research programmes

Records are not picked at random: each one narrows the question of one of these programmes. Touch a programme to filter the list.

Filter by kind

Findings ledger

Every record’s question and its outcome, one line each. Open a row for the detail.

Showing 10 records — All programmes

  • Service & load

    4 metrics

    measured today

    Question

    I measured PHP and Go on the same OAuth2 API: no gap at 10,000 writes, a real one at 50,000 reads

    The same API verifies an OAuth2 token on every request and then writes to or reads from PostgreSQL. On four cores, how much CPU do PHP-FPM, FrankenPHP worker mode and Go need for 10,000 writes and 50,000 reads a second?

    Finding

    At 10,000 writes a second all three candidates hit the target in five runs out of five, and none had a p99 above 2.5 ms: at this load the language is not a capacity line item. At 50,000 reads a second only Go held the target on four cores (p99 6.45 ms); PHP-FPM stopped at 23,528 and FrankenPHP at 22,859. CPU per read request is 64 microseconds for Go, 117 for FrankenPHP and 168 for PHP-FPM. Sized by instance, 50,000 reads take 3.4 cores in Go and 8.2–8.8 cores for the two PHP candidates. FrankenPHP's CPU saving does not turn into capacity: at saturation it leaves about one of its four cores idle.

    Measurement Medium confidence
  • Language & runtime

    4 metrics

    measured 25 days ago

    Question

    Laravel's preload curve: 123 files buy eight times what the last 1,912 do

    How far can a curated preload take Laravel, and what does each slice cost in start-up time?

    Finding

    The curve is not proportional to volume. The first 1,592 files — Laravel's own framework — buy 30 ms and add 1.2 seconds to start-up. The next 1,094 Symfony files buy 9.5 ms for free. The **123 files** after that (psr, carbon) buy 15.7 ms, more than the 1,094 before them. And the last 1,912 buy 1.8 ms while adding another 1.2 seconds. So the blanket preload the earlier record measured as a ceiling is the worst point on the curve that is not the origin: stopping at 2,809 files gives 12.77 ms for 1,514 ms of start-up, while 4,721 files ask 2,691 ms to reach 10.96 ms.

    Measurement High confidence
  • Database & queries

    4 metrics

    measured 25 days ago

    Question

    A partial index makes a queue table forty-one times smaller — for as long as the planner picks it

    On a Postgres queue table with millions of dead rows, what does a partial index buy, and when does the planner refuse to use it?

    Finding

    At 10 million dead rows a partial index sustains 11,537 claims per second where the same table without one manages 7. Against a composite index the throughput difference is small (6.9%) but the size difference is not: 7.6 MB against 310.4 MB, and the partial one does not grow with the table because it indexes only the 5,000 live rows. None of that is the real finding. The moment the planner switches a prepared statement to a generic plan the partial index stops being used at all — 11,752 tps becomes 7, and 0.68 ms becomes 1.1 seconds. A factor of 1,635. The composite index is untouched under the same conditions.

    Measurement High confidence
  • Database & queries

    4 metrics

    measured 25 days ago

    Question

    The partial index grew three hundred and five times in fifteen minutes — and autovacuum never ran

    Under sustained churn, does a partial index stay small on a queue table, and do the default autovacuum settings keep up with it?

    Finding

    With the live set holding steady at five thousand rows the partial index went from 0.125 MB to 38.2 MB — three hundred and five times. Its smallness comes from the live set, its bloat rate comes from throughput, and nothing connects the two. The composite index bloated less in proportion (42%) and more in absolute terms (+126 MB), and while bloating it stopped fitting in memory: its latency went from 0.52 ms to 61 seconds and its backlog climbed to 126,000. Fifteen minutes produced 1.75 million dead rows and autovacuum **did not run once** — the default threshold scales with the whole table (50 + 0.2 × 10 million ≈ 2 million) while the churn happens in a tiny subset.

    Measurement High confidence
  • Database & queries

    4 metrics

    measured 25 days ago

    Question

    Postgres never turned the partial index into a generic plan: forty executions, forty custom plans

    Does Postgres switch a partial-index query to a generic plan on its own inside a prepared statement — or is the 1,635-fold cliff something you have to opt into?

    Finding

    Postgres declines. On the partial index all forty executions used a custom plan — the counter reads 40/0. The reason it declines is the disaster itself: a generic plan cannot use the partial index, so its estimated cost comes out high and the planner does not choose it. The composite index switches at the sixth execution exactly as documented (5/35) and loses nothing by it. So the 1,635-fold cliff is real but fenced: reaching it takes writing `plan_cache_mode = force_generic_plan`.

    Measurement High confidence
  • Frontend performance

    4 metrics

    measured 28 days ago

    Question

    How you import Chart.js decides how many kilobytes the visitor downloads

    In a real production build, what is the difference between `chart.js/auto` and a selective `Chart.register()` — in kilobytes?

    Finding

    Selective registration saves 9.7 kB gzip over `chart.js/auto` (67.8 → 58.1 kB, 14.3%). The larger drop is not in the library core but in leaving unused controllers out: a page that registers only the bar chart falls to 46.0 kB — two thirds of auto.

    Measurement High confidence
  • Language & runtime

    4 metrics

    measured 25 days ago

    Question

    opcache preload cuts the deploy bill by up to fourteen times — but five of seven frameworks do not hand it to you

    With `opcache.preload` on, how long is the first request seven PHP frameworks serve after a deploy, what does the gain cost, and who can actually have it?

    Finding

    Preload shortens the cold first request by between 3.5× and 14.2×: Symfony drops from 35.58 ms to 2.50 ms, down to Phalcon's bare figure. But only two of the seven candidates — Symfony and CodeIgniter — publish a preload file of their own; for the other five the gain sits on the table waiting for the user to write one. Writing one is not as easy as it looks: a preload generated blindly from the classmap never brings Symfony up at all, and on CodeIgniter it does worse (5.29 ms) than the hand-picked official file (3.13 ms). And the cost does not vanish: Laravel's classmap preload takes the 62 ms it saves each visitor and writes it back as 2,340 ms of php-fpm start-up.

    Measurement High confidence
  • Language & runtime

    4 metrics · 3 sources

    checked 25 days ago

    Question

    The PHP ecosystem does not wait for a new release — but it does not declare support either

    After a PHP release ships, when do the 500 most-installed Composer packages declare that they support it, and how much does that declaration actually say?

    Finding

    43.5% of installs arrive on a constraint with no upper bound at all — `symfony/console` says `>=8.4.1` today, which claims support for PHP 12 as well. Of the 280 packages that do close the top, 247 made the commitment before the version existed: `guzzlehttp/guzzle` covered 8.4 in October 2020, four years early. That leaves 33 packages that genuinely waited, at a median of 325 days. The raw medians fall version over version and read as an ecosystem speeding up; restricted to an equal observation window the trend reverses (238 → 215 → 325 days).

    Survey High confidence
  • Tooling comparison

    4 metrics

    measured 27 days ago

    Question

    The fixed cost of installing a PHP framework: disk size tells you nothing

    How many megabytes on disk, how many files per request and how many milliseconds on the first request do seven PHP frameworks cost — and which of those numbers actually predicts throughput under load?

    Finding

    Disk size predicts nothing: Yii2 has the largest vendor tree at 34.1 MB and loads only 62 files per request, among the fewest in the field. Files per request predicts nothing either: CodeIgniter loads 96 files and serves 6,431 req/s, Symfony loads 224 and serves 13,067. The one number that genuinely separates them is the first request served with a cold opcache: 2.2 ms for Phalcon, 72.2 ms for Laravel — thirty-three times. That is the compile bill the first visitor pays after every deploy, and it is measured in tens of milliseconds, not kilobytes.

    Measurement High confidence
  • Service & load

    4 metrics

    measured 27 days ago

    Question

    Seven PHP frameworks under identical load: the gap narrows as soon as the request does real work

    On the same hardware, the same PHP build and the same seven routes, how many requests a second do Laravel, Symfony, CodeIgniter, Yii2, Phalcon, Laminas and Slim serve, and at what latency?

    Finding

    On an empty route the fastest is 4.4× the slowest (Slim 25,975, Laravel 5,966 req/s). As soon as the request does real work the gap closes: 3.7× for a single row from the database, 3.5× for twenty rows. Phalcon is third on an empty route and fifth once a query is involved — being a C extension buys nothing while the process waits on MySQL. And the expensive decision is not the framework: Laravel's own default `web` middleware group takes the same response from 5,858 to 2,176 req/s, so one default costs more than most of the distance between the frameworks.

    Measurement Medium confidence

Something you want looked into

If there is a question or a comparison you are curious about, write — it could be the next record.

Search the site

Start typing to search posts, projects and pages.

Esc to close Powered by Pagefind