[wp-hackers] Cloning content from Master site into new sites on a WP Network

Bill Dennen dennen at gmail.com
Wed Jul 11 19:14:24 UTC 2012


> The problem with switch_to_blog is that it has a fair amount of
> overhead, and so you shouldn't do it too often or unnecessarily.

Otto, thanks. This was my suggestion to Jesse too.

One thing that has puzzled me is the notion that switch_to_blog
shouldn't be used too often. How often is too often? Is it even
possible to measure such a thing?

Put it another way - when is it safe to use, and when is it not? At
what point does it affect performance?

Of course, every site is different. So there probably isn't a hard and
fast rule.

But, switch_to_blog is a very useful tool. I use it for many things --
and when combined with things like transients and other caching, I
don't notice any performance problems.


More information about the wp-hackers mailing list