Benchmarks

PerfLocale’s own code time, measured on real multilingual sites — not the full page-load number, which depends on your theme, other plugins, hosting and caching too.

  • Median around 1 ms on typical multilingual sites
  • 0 of 1,440 samples exceeded 5 ms on typical sites — across no-cache, cold-Redis and hot-Redis
  • Large sites (over ~2,000 translation links) need a persistent object cache to stay under 5 ms

Summary

For typical multilingual sites — the configuration most readers of this page actually run — PerfLocale adds about 1 millisecond to a page request. In a 2,880-sample matrix across both site topologies and three cache states, not a single one of the 1,440 typical-site samples crossed 5 ms.

For sites with more than roughly 2,000 translation links, the number depends on whether you have a persistent object cache (Redis, Memcached, Object Cache Pro, etc.). With a warm object cache the plugin stays well under 5 ms; without one, it climbs into the 5–8 ms range. We say so explicitly further down.

What we measured

An mu-plugin profiler wraps every callback whose class lives in the PerfLocale\ namespace and records the time spent inside. We subtract the profiler’s own overhead so the published numbers are the plugin’s actual code time, not the measurement artifact.

Not in scope: WordPress’s filter-dispatch overhead, your theme, other plugins, database, PHP boot, network. Those are still in your real TTFB — the plugin is one slice of the whole stack.

Test setup: a real multilingual site (20 translation groups, 40 linked posts, two active languages) on a stock WordPress install with no extra plugins. Numbers below are the median (typical request) and worst-observed value across 40 measured samples per cell, after 5 warm-ups.

Typical sites (under ~2,000 translation links)

This covers the vast majority of real installs — blogs, small to medium business sites, shops with a few hundred multilingual products. PerfLocale’s built-in caching keeps every translation link in memory; no object cache plugin needed.

Site typeCacheMedianWorst observedOver 5 ms
Single-siteNo object cache~0.6 ms2.0 ms0 / 240
Single-siteRedis cold (after cache flush)~1.3 ms4.9 ms0 / 240
Single-siteRedis hot (steady-state)~0.5 ms1.8 ms0 / 240
Multisite (subdirectory)No object cache< 0.1 ms*1.6 ms0 / 240
MultisiteRedis cold~0.1 ms1.4 ms0 / 240
MultisiteRedis hot< 0.1 ms*1.4 ms0 / 240

* On the multisite topology the plugin’s code time on a warm request is below our profiler’s own measurement floor — effectively unmeasurable on this hardware. The numbers above are the average of all six tested configurations per row.

Bottom line for typical sites: the median is roughly 1 millisecond, almost every request lands under 2 ms, and across 1,440 measured samples we did not record a single one over 5 ms in any cache state.

Large sites (more than ~2,000 translation links)

Past a few thousand linked translations the plugin can no longer keep the full link table in memory and falls back to a per-link cache. For those sites a persistent object cache is required to stay under 5 ms:

Site typeCacheMedianWorst observedOver 5 ms
Single-siteNo object cache~7.8 ms11.1 ms240 / 240
Single-siteRedis cold~4.4 ms8.7 ms46 / 240
Single-siteRedis hot~2.2 ms3.9 ms0 / 240
MultisiteNo object cache~5.1 ms8.8 ms135 / 240
MultisiteRedis cold~2.2 ms4.2 ms0 / 240
MultisiteRedis hot~0.9 ms2.0 ms0 / 240

Recommendation for large sites: install a free Redis Cache plugin (or whatever your host provides). With Redis warm, even the largest tested configuration sits comfortably under 5 ms. Without one, plan for a higher floor.

Across the six tested configurations

We measure six combinations of the most impactful settings: URL prefix style (slug like /en/ or locale like /en-us/), whether the default language hides its prefix, whether strings translate from files or the database, and whether the language fallback chain is enabled. Numbers below are the median plugin code time with a hot Redis cache — the configuration most production sites run.

ConfigurationPrefixHide defaultStringsFallbacksSingle‑siteMultisite
baselineslugofffilesoff~1.5 ms~0.7 ms
locale_prefixlocaleofffilesoff~1.5 ms~0.7 ms
hide_defaultslugonfilesoff~1.5 ms~0.7 ms
db_stringsslugoffdatabaseoff~1.5 ms~0.7 ms
db_hide_defaultslugondatabaseoff~1.5 ms~0.6 ms
fallback_chainslugofffileson~1.5 ms~0.6 ms

The configuration column makes almost no difference. Flipping URL prefix style, hiding the default-language prefix, switching strings from files to the database, or turning on the fallback chain — each costs at most a few microseconds of plugin code time. The dominant factor is your cache state (no-cache vs. cold vs. hot Redis), shown in the tables above; the per-feature column is essentially flat.

That means: pick the URL style and string mode that fit your workflow, your SEO strategy, and your migration plans. Don’t pick them for performance — PerfLocale doesn’t charge you for any of them.

Does it stay fast at scale?

We re-measured with 10,000 posts seeded across two languages on the same test sites. With a persistent object cache, internal hot-path operations stay sub-millisecond even at 10× the data volume:

Internal hot-path operationMean at 10K scaleDB queries
Detect a post’s language (warm)~0 ms0
Filtered WP_Query (20 posts in one language)0.07 ms0
Batch-prime translations for 50 IDs0.01 ms0
Get 200 strings from the database~0.05 ms1

What this doesn’t mean

  • This is the overhead PerfLocale adds to a request, not the total request time. WordPress core, your theme, other plugins, the database and PHP boot all still contribute.
  • Numbers from one hardware configuration don’t transfer 1:1 to another. A host with slow MySQL or missing OPcache shows worse numbers across the board — for PerfLocale and for everything else on the site.
  • Production sites usually keep caches warm all day. The cold-Redis row above represents what happens immediately after a cache flush, which is rare in normal operation.
  • The 5 ms target is a self-imposed bar for the plugin’s own code time. The plugin will function on any WordPress install regardless — it just may be a millisecond or two slower on a large site without an object cache.