[wp-hackers] many plugins and performance

Jeremy Visser jeremy at visser.name
Mon Feb 1 11:25:15 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/02/10 22:06, Konrad Karpieszuk wrote:
> then on every 'hook' check if in those file are some actions... it
> doesn't sound efficient

Not quite — instead, when the plugin registers with a hook, it stores
the function callback with the hook. So when the hook is triggered, it
simply iterates through each callback.

It doesn't have to ask each plugin whether it's registered with that
hook or not every time the hook is called. That sort of behaviour is
reserved strictly for use within Microsoft operating systems. :)

But yes, there are performance penalties associated with the use of
plugins. That's the price you pay for convenience. But plugins aren't
nearly as inefficient as what you seem to understand them as being. :)

It's just a matter of benchmarking to figure out where specifically your
problem lies.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktmuhcACgkQvs6Qqs8TxBpklwCgmcHAkuznTyuMihwePiCFnwmi
gikAoNqScrVPiFQjxgp37TDxZb8+SzRP
=zCgo
-----END PGP SIGNATURE-----


More information about the wp-hackers mailing list