You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we have multiple teams, filament always does a check of the policies for every team instead of only for the current team. In large applications with lots of teams this can slow down the application a bit.
So for example, here I have a simple filament dashboard with only one Resource "Posts". If I have one Team, this is the output for the Gates in debugbar.
When registering a new Team, it loads the policies (of the navigation?) multiple times.
With 2 teams:
With 3 teams:
And so on
Expected behavior
It should only load the correct policies once.
Steps to reproduce
Clone the repository, create a couple of teams and check the debugbar. Everytime you add a new team, the "Gates" will increase in debugbar.
Reproduction repository (issue will be closed if this is not valid)
Package
filament/filament
Package Version
v3.2.124
Laravel Version
v11.32.0
Livewire Version
v3.5.12
PHP Version
PHP 8.3.3
Problem description
When we have multiple teams, filament always does a check of the policies for every team instead of only for the current team. In large applications with lots of teams this can slow down the application a bit.
So for example, here I have a simple filament dashboard with only one Resource "Posts". If I have one Team, this is the output for the Gates in debugbar.
When registering a new Team, it loads the policies (of the navigation?) multiple times.
With 2 teams:
With 3 teams:
And so on
Expected behavior
It should only load the correct policies once.
Steps to reproduce
Clone the repository, create a couple of teams and check the debugbar. Everytime you add a new team, the "Gates" will increase in debugbar.
Reproduction repository (issue will be closed if this is not valid)
https://github.com/wannesmatthys/filament-gates-reproduction
Relevant log output
No response
Donate 💰 to fund this issue
The text was updated successfully, but these errors were encountered: