- Affected version
- 2.0.2
Once thing I've noticed with XF2 is that the performance of rebuilding permissions is much worse than XF1.
If there are too many permission combinations PermissionRebuild job is queued. This rebuilds every permission combination, not just the changed combinations. For large number of combinations which aren't being changed, this has a significant overhead. Why couldn't this job take a combination id, and the calling code generate a job per combination id? This would ensure only one rebuild per combination id was possible and is very simple to implement.
Finally, saving a user group always triggers a triggerCacheRebuild. Despite the entity representing permission entity may not be changing, and there being non-permission settings on a usergroup.
Together these two issues make touching permissions vastly slower than they need to be.
If there are too many permission combinations PermissionRebuild job is queued. This rebuilds every permission combination, not just the changed combinations. For large number of combinations which aren't being changed, this has a significant overhead. Why couldn't this job take a combination id, and the calling code generate a job per combination id? This would ensure only one rebuild per combination id was possible and is very simple to implement.
Finally, saving a user group always triggers a triggerCacheRebuild. Despite the entity representing permission entity may not be changing, and there being non-permission settings on a usergroup.
Together these two issues make touching permissions vastly slower than they need to be.