filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.43k stars 2.73k forks source link

Performance issue with table #13631

Closed Tryfciu closed 1 month ago

Tryfciu commented 1 month ago

Package

filament/filament

Package Version

v3.2.94

Laravel Version

v10.48.16

Livewire Version

v3.5.4

PHP Version

PHP 8.2

Problem description

Hey! Yesterday we managed to bump versions in our application (v3.2.73 -> v.3.2.94) and we encountered strange performance drop with table component. After version bump in some cases our table load time jumped from couple of seconds to 20-30 seconds. To be fair, our table is huge (100 records, 12 columns, 20+ filters), and it already had some issues with performance but we solved some of them and were happy. I run some performance tests to find out what is going on and this is the result.

Before version bump

image

After version bump

image

It looks like watchForCheckboxClicks method takes enormous amount of time to do the work. There was a discussion about possible performance but as far as I understand there were no changes made.

LINKED PR https://github.com/filamentphp/filament/pull/13074

Expected behavior

We would like the table to load in the same amount of time it did before or at least in bearable time. In the linked PR there was an idea to let user manage this feature on/off and it would be superb for us.

Steps to reproduce

In provided repository:

Reproduction repository (issue will be closed if this is not valid)

https://github.com/Tryfciu/filament-issue

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

den1n commented 1 month ago

I have the same problem with Filament v3.2.95.

The table freezes every time:

image

My table contains 1800 records, paginated by 100 records.

Montaserz commented 1 month ago

We are facing the same issue with watchForCheckboxClicks. Tried downgrading to 3.2.92 and still facing the same issue. 50 records only. Screenshot