acarp20
acarp20
FFilament
Created by acarp20 on 10/31/2023 in #❓┊help
Applying table filters with action instead of `wire:model.live` on each
Has anyone got a trait or something they use to prevent a table's filters from automatically being applied each time their corresponding form element is updated? I have a resource with multiple relations, meaning that queries for the list page take their time. Ideally one would apply all the filters in one go with an 'Apply' button or similar.
4 replies
FFilament
Created by acarp20 on 8/24/2023 in #❓┊help
Optimizing Filament test suite speed
As my application has grown and grown, I'm starting to notice how long my test suite takes to run. I'm also hunting down the cause of a memory leak somewhere... Currently in the tests/Feature/Filament folder I have 298 tests which have a total of 2049 assertions. I'm noticing a large bottleneck when filling forms which has to do with Livewire. Calling ->fill([...) sets each key/value pair individually causing the component to be rehydrated, when normally the bulk of these fields are deferred and therefore batched in one update. This means that any complex logic, queries, otherwise long closures, etc. that get run upon hydration are run for each property. When you have a large form with 20+ properties, this gets ridiculous. For the end user, it's not a problem as fields are deferred. I also don't think it makes sense to implement manual caching logic in the Livewire component just for ensuring tests are N times faster. It seems that perhaps the Livewire internals in v3 may make this possible. Does anyone have a solution here? Has anyone discovered any other optimizations?
2 replies