Testing Translation Function Speeds in WordPress

Speed of memoryAfter reading Pippin Williamson’s post about gettext speed issues, I wanted to learn more. My IDX+ plugin has 815 translatable strings, and I was worried that it was having a performance impact on the plugin.

I created a test that looped through different methods of outputting and printing strings to try and determine their relative speed. WordPress uses different functions for translating strings, as documented in the Codex, and I included __() and _e(), the functions I use the most often.

Here are the results of a 100,000-iteration loop:

  • echo 'Test': 0.1786 seconds
  • $out .= 'Test': 0.2454 seconds (37.4% slower)
  • __('Test'): 0.5301 seconds (196.8% slower)
  • _e('Test'): 0.5639 seconds (215.7% slower)
  • echo __('Test'): 0.5722 seconds (220.4% slower)
  • __('Test', 'test'): 0.5743 seconds (221.6% slower)
  • _e('Test', 'test'): 0.6076 seconds (240.2% slower)
  • echo __('Test', 'test'): 0.614 seconds (243.8% slower)
  • $out .= __('Test', 'test'): 0.6885 seconds (285.5% slower)

“Findings” (non-scientific)

  • Contrary to what I had read, echoing inline was by far the fastest method.
  • Adding a domain (the second parameter) to translation functions slows the functions down a bit.
  • Storing strings in a variable after using __() is slow.
  • All times are well below 1/10th of a second when translating 10,000 strings instead of 100,000.


Although translating 100,000 strings adds half a second processing time, if your site is processing well less than that, you shouldn’t have a problem.

It seems the site Pippin was working on had enough strings to affect the responsiveness of the site, but I would bet that’s not a normal site. I also would bet that the issues the site was having are not because of the translation functions themselves, but the translation plugin the site was running.

I’m going to be using more _e() and less echo __(), but other than that

Denver Performance-Based SEO plans

Lights shine on a performance

Only pay for great optimization results

One of Katz Web Design’s Denver web design clients wanted an option for performance-based SEO (Search Engine Optimization), rather than a monthly set price, so I created a package.

Here’s the gist of our SEO package:

  • Pay only $5.00 an hour for optimization
  • Targeted keywords are given a value based mainly on the competition’s SEO strength (content optimization, inbound links, age of site, etc.)
  • Monthly payment per keyword are based on SEO click-through statistics  (eg: the #1 result gets 42% of all clicks) and SEO difficulty
  • Minimum 3 month contract, or by the month with a 15% premium

Continue reading “Denver Performance-Based SEO plans”

Load time improvements

Load time matters

Imagine waiting 18 seconds for a page to load (on a high-speed connection) — not just the home page, but any inside page of a website.  Pretty frustrating, right?  Having bad load times makes a huge difference to your customers.  I helped a new client reduce page load time from 19 seconds to 3 seconds.

Continue reading “Load time improvements”

Is Blogging Really Worth the Time?

One reason to blog is traffic! [Image of traffic light]

Today, a business associate asked me “I know about blogging, and it seems like a waste of time. Why is blogging worth the time?” I was able to reply with some very convincing arguments — and in a way, I reminded myself about the value of blogging.

  1. Blogging establishes you as an expert in your field
  2. Search engine traffic dramatically increases
  3. Blogging is basically free marketing for your business: the only cost is your time.
  4. Blogging forces you to write about your life and your business

Continue reading “Is Blogging Really Worth the Time?”