Re: get_userdata(): should I be worried about too many db queries?
@Bolonki, I’m going to play devils advocate for a second and probably take the wrong side of this conversation, but the problem with query reduction in a social networking platform is that the only way to do it is to limit the available run-time data, or rearrange data structures to the point where other plugins can’t tap into them or repurpose them.
BuddyPress itself is a core set of 9 plugins, an abstraction layer for WPMU blogs, an API for bbPress, and comes with an elaborate set of functions and API to retrieve that data and use it in a theme; and most of this is accessible on almost every page of your website. If you need the functionality that BuddyPress provides, then hopefully you’re prepared for the overhead it takes to have all of those resources available. If you don’t need parts of it, you can turn them off and reduce queries.
This isn’t to say that BuddyPress doesn’t strive to be efficient, and in future versions you can bet that as more people become actively involved in the project that it will only get better.
Everyone has parts of web development that they’re passionate about. Some people dig SEO, some love web standards, others are worried about queries, and others are worried about server speed. There’s a lot of roles and lots of talent paying attention to all of the different aspects of what makes this all work. Remember that this is an open project, and we welcome you or anyone else to take a look at ways to make the platform better and are genuinely excited for anyone to contribute in any way.
I’m curious how many queries other social network sites use on a single page load. Can you imagine how many servers Facebook must use? Or wordpress.com? Must be pretty intense to manage all that data and traffic.