XF 1.4 Xenforo from VB - Large Forum Optimization/Best Practices question


Hello, Just purchased Xenforo and looking to move our vbulletin 4.* site.

However I have a few questions about optimization and best practices. So first let me describle our forum. Our current site is http://www.leaguegaming.com/forums/forum.php . We run professional leagues with thousands of players. For example we run a team hockey league that has over 3000+ members over 128 teams for just one league. So our forum has roughly 600 forums and about 400 usergroups. The reason for this, is each team has its own private forum.

So my question really starts there, We have a lot of private forums and i noticed the table xf_permission_cache_content has over half a million rows because i assume each forum and each usergroup (and maybe each permission) get a row? This has lead to updating forum permissions to be very slow. For example this screen takes up to 10 minutes

I thought if i set the forum as private

And then just give access to the one usergroup, this would be much more efficient since everyone is denied but that single usergroup, but this still creates about 500+ rows in `xf_permission_cache_content` table, thus making updates to permission painfully slow.

So my question is, how should we handle this on a large scale, and what is the best practice?



XenForo developer
Staff member
XenForo works on the basis of "permission combinations". Each permission combination represents a potentially unique permission configuration that's actually in use. This means for each combination of user groups that has been set for your users, a permission combination is created. If a user has user-specific permissions as well (such as by being a moderator), they will have a distinct permission combination.

The number of combinations you have will likely be correlated with the number of groups you have, but I couldn't really suggest how many you have. You'd have to look in the xf_permission_combination table. We appear to have 63 here; I suspect you'll have many more.

For each permission combination, we store the final, "compiled" permissions globally and for every node. This massively improves performance throughout XF by doing a lot of pre-calculation so it can simply be used when needed.

So really, there isn't any way around it short of reducing the number of permission combinations you use.