Skip to content

Instantly share code, notes, and snippets.

Thorsten Ott tott

Block or report user

Report or block tott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Viper007Bond
Viper007Bond / whatissoslow.php
Last active Apr 24, 2019
WordPress: Times how long it takes each filter and action to run and displays results at the end of the page. Quick and dirty.
View whatissoslow.php
<?php
/**
* This little class records how long it takes each WordPress action or filter
* to execute which gives a good indicator of what hooks are being slow.
* You can then debug those hooks to see what hooked functions are causing problems.
*
* This class does NOT time the core WordPress code that is being run between hooks.
* You could use similar code to this that doesn't have an end processor to do that.
*
@nb
nb / class-query-iterator.php
Created Nov 12, 2012
WordPress Chunk Query Iterators
View class-query-iterator.php
<?php
/**
* Iterates over results of a query, split into many queries via LIMIT and OFFSET
*/
class QueryIterator implements Iterator {
var $limit = 500;
var $query = '';
var $global_index = 0;
You can’t perform that action at this time.