[wp-hackers] Profiling Wordpress filters and actions
Johan Eenfeldt
johan.eenfeldt at gmail.com
Thu Jan 8 15:51:51 GMT 2009
On Thu, Jan 8, 2009 at 4:08 PM, Jacob Santos <wordpress at santosj.name> wrote:
> I see so your example involves the hooks and not the Plugin API itself. It
> is somewhat difficult to optimize the Plugin API. Well, you could just use
> plugins which use functions instead of classes or classes that use static
> methods.
Well, sure.
But compared to the other stuff here, the cost of the API and
different calling methods are very small. From testing it the
difference between a function and a class called in a filter is not
quite 1 millisecond when called 400times (out of maybe 3.5s unmodified
page creation time in this case).
>From some performance work I've on the various plugins I use the
biggest things (by far) is to not add those filters unless it will
actually be used, and try to work around db calls.
In this case I profiled with all plugins deactivated.
/ Johan
More information about the wp-hackers
mailing list