Slow Query for the wp_options table

Update: The reason the query is being logged is it doesn’t use an index. The query time is 0, i.e. it actually executes fast. You can unset the “log-queries-not-using-indexes” option if you don’t want these to be logged. The wp_options table has no index on autoload (it now should, it was added to WP core … Read more

get_option() vs get_theme_mod(): Why is one slower?

The answer that yes, the theme_mod functions will be slower, but not significantly, and the benefits outweigh the differences. Theme mods are stored as options. So, in essence, the theme_mod functions are wrappers around the options functions. First, understand that theme_mod settings are stored as an array in a single option, keyed to the specific … Read more

Could the WP script/style loader be used to concatenate and gzip scripts and styles in the front-end?

late answer From a brief look: You’d have to use include( admin_url().’load-scripts.php’ ); and include( admin_url().’script-loader.php’ ); Then jump into $GLOBALS[‘wp_scripts’]: Use… $wp_scripts->default_dirs( array_merge( $wp_scripts->default_dirs ,array( ‘/themes/your_theme/js/’ ) ); …to extend it. And then use $wp_scripts->add( $handle, $path_from_content_dir, false/array( $deps ), $ver ) to add a script. Notes: Uncompressed scripts get searched by .dev.js (when … Read more

How well does WordPress scale?

Clearly nothing scales as well as static files served by a fast web server and any CMS that has to figure out what to load and then load it will not perform as well, WordPress or otherwise. One of the issues is the number of database queries required per URL request and my 2 prior … Read more

Ajax takes 10x as long as it should/could

Yep, this is nasty issue that to have full WordPress environment you need to spend considerable time loading it. I’ve needed much better performance (for very dynamic incremental search feature) for work and what I went with is: Custom file as Ajax handler. SHORTINIT constant for limited WP core load. Very selectively loaded parts of … Read more