WordPress WP-Super-Cache vs Quick Cache

Joomla, Drupal and WordPress are the world’s most popular blogging platforms. Right now I’m staring at the WordPress “Add New Post” page, because this blog is built on WordPress. WordPress is great. And incredibly slow.

Here’s One I made Earlier

This post appeared quickly in your browser ? Great. You have been served a page that was built several hours ago. Without the pre-fabricataion, you would have had a 5 or 10 second wait while WordPress created the page from scratch. Who waits 10 seconds for a page to load these days ? Nobody, that’s who. This post compares two WordPress caching plugins and finds that WP-Super-Cache is the best because of its ability to cache compressed pages. Continue reading

Perl – OR Pattern Match Slow, Use Two Patterns Instead

A handy feature of regular expressions is their ability to “or” match. Searching for two strings in a file is easy with a construct like “egrep ‘root|uucp’ /etc/passwd”. The vertical bar (“|”) acts as an “or” operator. Perl supports the vertical bar too, and the same match could be achieved in Perl thus:

bash-4.2$ perl -n -e 'print $_ if /root|uucp/' < /etc/passwd root:x:0:0:root:/root:/bin/bash uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin

Weirdly though, this construction is up to 10 times slower than 2 separate matches performing the same search, as can be shown with a quick demonstration. Continue reading