XF 2.0 Rebuilding permissions takes an extremely long time

Warchamp7

Active member
This was an issue in XF1 that has carried over to my mock upgrade to XF2 (Sadly)

Our forum data has moved across a wide number of forum software over many years and is likely a complete mess permissions wise at this point.

Barring starting over from scratch on all usergroups, I'm curious where I should look first to help address these timings.


Are there any known scenarios that would lead to long rebuild times? Any queries I can use to test if it's those?
 
How many nodes do you have? How many user groups do you have? How long is the rebuild actually taking?

The amount of time it takes will directly correlate to how many permission combinations you have, hence why the number of nodes and user groups will have an effect. There is such a thing has orphaned permission combinations, and there is a "Clean up permissions" tool for that in Admin CP > Tools > Rebuild caches.

Worth timing the process before running that, and after, to see if it makes a difference.
 
How many nodes do you have? How many user groups do you have? How long is the rebuild actually taking?

The amount of time it takes will directly correlate to how many permission combinations you have, hence why the number of nodes and user groups will have an effect. There is such a thing has orphaned permission combinations, and there is a "Clean up permissions" tool for that in Admin CP > Tools > Rebuild caches.

Worth timing the process before running that, and after, to see if it makes a difference.

419 nodes. 50 usergroups. 3+ minutes to save a user group.

I will get a proper timing and try the clean up (y)
 
To be honest, I wouldn't say that's totally unexpected with those numbers. But it will be interesting to see the timings before and after.
 
@Warchamp7 my User Mention Improvements for XF2 replaces the 'rebuild all permissions' logic with targeted rebuilds (that is done with a few user group combos, but not for large numbers). It helps significantly in my development environment.

There is such a thing has orphaned permission combinations, and there is a "Clean up permissions" tool for that in Admin CP > Tools > Rebuild caches.
The bulk-rebuild permissions task does this as it's first step in XF2
 
@Chris D 3m16s before clean up and pretty much the same post clean up :/

What would yield the biggest returns on reducing that time? Less nodes? Less user groups? Less nested nodes? Less nested nodes with distinct permissions?
 
Heya @Chris D, wanna bump the above question. What's my best target for trying to bring these times down?

Users with individual permissions? Nodes with redundant permissions that match the parent node? etc.

If I hypothetically had 1000 nodes without any node-specific permissions inside a category node that was hidden to the Registered group, does it need to process every one of those child nodes for every user? What if 1 of those 1000 nodes had permissions? Does it only process that 1 node per user? Or will it need to go through all the siblings as well
 
Last edited:
Back
Top Bottom