Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Action Modal Performance Degrades with Large Datasets in Filament 3.2 #15169

Open
ruan11223344 opened this issue Dec 24, 2024 · 0 comments
Labels

Comments

@ruan11223344
Copy link

Package

filament/filament

Package Version

3.2

Laravel Version

11.31

Livewire Version

3.2

PHP Version

8.3

Problem description

When using Table Actions with a large number of rows (50+), there is a significant performance lag when opening the action modal form, especially with reactive form components and preloaded selects. The lag increases with the number of table rows.

Expected behavior

When clicking on a table action (like changing status) in a table with 50+ rows, there is a noticeable delay (3-4 seconds) before the modal opens. The network tab shows that the Livewire payload for the update request is quite large, and the browser becomes less responsive during this operation.

Steps to reproduce

The table action modal should open immediately (under 200ms) regardless of the number of rows in the table, providing a smooth user experience without any noticeable lag.

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

https://github.com/ruan11223344/filament_action_slow

Relevant log output

The table action modal should open immediately (under 200ms) regardless of the number of rows in the table, providing a smooth user experience curl 'http://ip:8588/livewire/update' \
  -H 'Accept: */*' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,ja-JP;q=0.8,ja;q=0.7,en;q=0.6,zh-TW;q=0.5,und;q=0.4' \
  -H 'Connection: keep-alive' \
  -H 'Content-type: application/json' \
  -H 'Cookie: 9a2abdd6427214bc945261230fac9fd8_ssl=5950c10c-5782-422f-95ae-5253c9b11672.iHGgjNXW2MPnNdiRtVpOC2Yp1_o; aacb3e162f7eca999d3fbc5139bbe3e3_ssl=f11c6dc3-7394-4316-bc90-b11578b946d0.ntS9Aq3-ETFJGdGa9aiCo62pL_w; 0cbbeb71030cbf0f2dd624282489aba0_ssl=c7cf126e-5d32-48f7-8d48-0faf6f9c2a44.qNRBRHNd_ncAS5t3UKN2x-3DWL8; 344854e5de316a2e865c589a26b55abb_ssl=89768016-001d-4f09-a383-cb71a616c46d.h8gx9wOSmhCn1CEH2Gd17B3xplw; 1b4baebaf7c37ed26c6d1db81c94739c_ssl=3246d3ec-29cc-44d9-bfbd-1f918c3fa2f9.0C4dmieC3tY496xBeebMr2GtTCY; XSRF-TOKEN=eyJpdiI6IitJTFhBOGN0YkVSU2hXaE5TSEROY1E9PSIsInZhbHVlIjoid01samFySTlVQTViQ3RKZXg3TThsR3M4YlhPZnFMQ3NvVTlUZWlTWGN4Y1BiOG50RFlZeEVHT0JiKzJkZXhDRFJtOS9JMG14Q1FWM1ljTmNNcW1BTXlqU1NUaWdVbHY2Y1RyMkQ4N3hDdnAwbXF6L0VHRFlLL0Y1KytRUXZlUzciLCJtYWMiOiJmMDcyZGNhMGNlMjE5ZWZkYjg0YjBiZGFmMTg2YjQ0MGIxMWIxMjI3NTE4MGUxNjg3MDQ4ODk2MzU3YmRhYjY3IiwidGFnIjoiIn0%3D; freighttrackingsystem_session=eyJpdiI6InVkcFduOXNlaVVhRzk4YStNVXI5UHc9PSIsInZhbHVlIjoiaWw2L055MGVmclFXSXhTVHdCSFVPTHE5d1hLNFlSRGRBQkUvNGNqRGFYYnQ5WERleTVZTkFJTHRJNW5yTC84SVd2QnAyTWVQS2FBOGNJOXg4d0lPRmNwUnpjUWRiOVgrSWhEUTAwVDhNVVIzM0FOWDJ0NlNZZ0pacW41NkkrMTkiLCJtYWMiOiI2YTM0MGFiNGExNjY3ODY2MTViMmE3NmZiZTBmN2Y0ZTJlMjViNmQ3ZmZiNTIyYjgyZWE4MDU0YzM5ODE1MGIwIiwidGFnIjoiIn0%3D' \
  -H 'Origin: http://ip:8588' \
  -H 'Referer: http://ip:8588/shipping-records' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' \
  -H 'X-Livewire;' \
  --data-raw '{"_token":"oYoqmiDWA1pvhMY4b7N5DnVCTFqeqE97A3axPVYn","components":[{"snapshot":"{\"data\":{\"isTableReordering\":false,\"tableFilters\":[{\"shipping_date_range\":[{\"from\":null,\"to\":null},{\"s\":\"arr\"}],\"shop_id\":[{\"value\":null},{\"s\":\"arr\"}],\"product_or_asin\":[{\"search\":null},{\"s\":\"arr\"}],\"status\":[{\"value\":null},{\"s\":\"arr\"}],\"operator_id\":[{\"value\":null},{\"s\":\"arr\"}]},{\"s\":\"arr\"}],\"tableGrouping\":null,\"tableGroupingDirection\":null,\"tableSearch\":\"\",\"tableSortColumn\":null,\"tableSortDirection\":null,\"activeTab\":\"\\u5168\\u90e8\",\"mountedActions\":[[],{\"s\":\"arr\"}],\"mountedActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedActionsData\":[[],{\"s\":\"arr\"}],\"defaultAction\":null,\"defaultActionArguments\":null,\"componentFileAttachments\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActions\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsData\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsComponents\":[[],{\"s\":\"arr\"}],\"mountedInfolistActions\":[[],{\"s\":\"arr\"}],\"mountedInfolistActionsData\":[[],{\"s\":\"arr\"}],\"mountedInfolistActionsComponent\":null,\"mountedInfolistActionsInfolist\":null,\"isTableLoaded\":false,\"tableRecordsPerPage\":\"50\",\"tableColumnSearches\":[[],{\"s\":\"arr\"}],\"toggledTableColumns\":[{\"operator\":[{\"name\":true},{\"s\":\"arr\"}],\"shipping_date\":true,\"fba_shipment_number\":true,\"shop\":[{\"name\":true},{\"s\":\"arr\"}],\"product_name\":true,\"total_products\":true,\"warehouses_summary\":true,\"shipping_channels_summary\":true,\"total_cost\":true,\"cost_verification\":true,\"status\":true,\"delivery_duration\":true,\"notes\":true,\"created_at\":true},{\"s\":\"arr\"}],\"mountedTableActions\":[[\"changeStatus\"],{\"s\":\"arr\"}],\"mountedTableActionsData\":[[[{\"status\":\"pending\"},{\"s\":\"arr\"}]],{\"s\":\"arr\"}],\"mountedTableActionsArguments\":[[[[],{\"s\":\"arr\"}]],{\"s\":\"arr\"}],\"mountedTableActionRecord\":\"75\",\"defaultTableAction\":null,\"defaultTableActionArguments\":null,\"defaultTableActionRecord\":null,\"selectedTableRecords\":[[],{\"s\":\"arr\"}],\"mountedTableBulkAction\":null,\"mountedTableBulkActionData\":[[],{\"s\":\"arr\"}],\"tableDeferredFilters\":null,\"paginators\":[{\"shipping-recordsPage\":1},{\"s\":\"arr\"}]},\"memo\":{\"id\":\"gOCD7qyFulG39QiLU4Pv\",\"name\":\"app.filament.resources.shipping-record-resource.pages.list-shipping-records\",\"path\":\"shipping-records\",\"method\":\"GET\",\"children\":[],\"scripts\":[],\"assets\":[],\"errors\":[],\"locale\":\"zh_CN\"},\"checksum\":\"83336269fb6368f57c1eb616fd10f2a488e1fbed43d4ac7ba18f17eb27de6c4e\"}","updates":{},"calls":[{"path":"","method":"unmountTableAction","params":[false,false]}]}]}' \
  --insecure ;

  
curl 'http://ip:8588/livewire/update' \
  -H 'Accept: */*' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,ja-JP;q=0.8,ja;q=0.7,en;q=0.6,zh-TW;q=0.5,und;q=0.4' \
  -H 'Connection: keep-alive' \
  -H 'Content-type: application/json' \
  -H 'Cookie: 9a2abdd6427214bc945261230fac9fd8_ssl=5950c10c-5782-422f-95ae-5253c9b11672.iHGgjNXW2MPnNdiRtVpOC2Yp1_o; aacb3e162f7eca999d3fbc5139bbe3e3_ssl=f11c6dc3-7394-4316-bc90-b11578b946d0.ntS9Aq3-ETFJGdGa9aiCo62pL_w; 0cbbeb71030cbf0f2dd624282489aba0_ssl=c7cf126e-5d32-48f7-8d48-0faf6f9c2a44.qNRBRHNd_ncAS5t3UKN2x-3DWL8; 344854e5de316a2e865c589a26b55abb_ssl=89768016-001d-4f09-a383-cb71a616c46d.h8gx9wOSmhCn1CEH2Gd17B3xplw; 1b4baebaf7c37ed26c6d1db81c94739c_ssl=3246d3ec-29cc-44d9-bfbd-1f918c3fa2f9.0C4dmieC3tY496xBeebMr2GtTCY; XSRF-TOKEN=eyJpdiI6Ik5HdDEwMnduZmdFSE0xTXNJK2JVM0E9PSIsInZhbHVlIjoiYnFvN3IweVo5OVNlTkM3aTI0cU02ZkhweVY1aHFYeUxMekVROFhRSWZJMFBBWGphTFVYMTczQkZJcmUzZWI4Q0RBSnZlUjBZeFpDUUhPNlM5MytZZTlZcFppbXFrc1dXOSs3eEd1KzBEa1dtWk5sTlhzcWNHWDJzeVpSQ3pyVTgiLCJtYWMiOiI3NzlmNzkyMmQ2NTM2NjM0OGQyNWMzMWExNDMzNDZjOGJlYmEyOTY0YWE0MGNjNjQ0N2RkMDI1YTZlMTA1Njc2IiwidGFnIjoiIn0%3D; freighttrackingsystem_session=eyJpdiI6ImNrSGsxMlgvVHpWeHV4eFc4TE9qQ2c9PSIsInZhbHVlIjoiUFNrNE1rMzFyWHVjVnViYXBPMWwyTUxEcjJmVlVJZ0ZwUCt0bi94cG5ZMUVOdEZyMjlVdU1Ed2o0TnFld3VRa3dndThmZDh1dEtJZFpiZVo5YWpsRnV3c0hvUHp1a2NuRCtCUVhTNTdIdlNmZ1g0NWlrZHkyVzFkNnd2T3RXU0giLCJtYWMiOiJhN2Q1YTY5NmIxY2E3NDYyYzViOTg2MmNiYTVkZmQ0MmI1Y2ZjNDAwOGQwMjQyZDlkNTczNWJkOTU5N2FhZjAxIiwidGFnIjoiIn0%3D' \
  -H 'Origin: http://ip:8588' \
  -H 'Referer: http://ip:8588/shipping-records' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' \
  -H 'X-Livewire;' \
  --data-raw '{"_token":"oYoqmiDWA1pvhMY4b7N5DnVCTFqeqE97A3axPVYn","components":[{"snapshot":"{\"data\":{\"isTableReordering\":false,\"tableFilters\":[{\"shipping_date_range\":[{\"from\":null,\"to\":null},{\"s\":\"arr\"}],\"shop_id\":[{\"value\":null},{\"s\":\"arr\"}],\"product_or_asin\":[{\"search\":null},{\"s\":\"arr\"}],\"status\":[{\"value\":null},{\"s\":\"arr\"}],\"operator_id\":[{\"value\":null},{\"s\":\"arr\"}]},{\"s\":\"arr\"}],\"tableGrouping\":null,\"tableGroupingDirection\":null,\"tableSearch\":\"\",\"tableSortColumn\":null,\"tableSortDirection\":null,\"activeTab\":\"\\u5168\\u90e8\",\"mountedActions\":[[],{\"s\":\"arr\"}],\"mountedActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedActionsData\":[[],{\"s\":\"arr\"}],\"defaultAction\":null,\"defaultActionArguments\":null,\"componentFileAttachments\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActions\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsData\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsComponents\":[[],{\"s\":\"arr\"}],\"mountedInfolistActions\":[[],{\"s\":\"arr\"}],\"mountedInfolistActionsData\":[[],{\"s\":\"arr\"}],\"mountedInfolistActionsComponent\":null,\"mountedInfolistActionsInfolist\":null,\"isTableLoaded\":false,\"tableRecordsPerPage\":\"50\",\"tableColumnSearches\":[[],{\"s\":\"arr\"}],\"toggledTableColumns\":[{\"operator\":[{\"name\":true},{\"s\":\"arr\"}],\"shipping_date\":true,\"fba_shipment_number\":true,\"shop\":[{\"name\":true},{\"s\":\"arr\"}],\"product_name\":true,\"total_products\":true,\"warehouses_summary\":true,\"shipping_channels_summary\":true,\"total_cost\":true,\"cost_verification\":true,\"status\":true,\"delivery_duration\":true,\"notes\":true,\"created_at\":true},{\"s\":\"arr\"}],\"mountedTableActions\":[[],{\"s\":\"arr\"}],\"mountedTableActionsData\":[[],{\"s\":\"arr\"}],\"mountedTableActionsArguments\":[[[[],{\"s\":\"arr\"}]],{\"s\":\"arr\"}],\"mountedTableActionRecord\":null,\"defaultTableAction\":[[],{\"s\":\"arr\"}],\"defaultTableActionArguments\":[[],{\"s\":\"arr\"}],\"defaultTableActionRecord\":[[],{\"s\":\"arr\"}],\"selectedTableRecords\":[[],{\"s\":\"arr\"}],\"mountedTableBulkAction\":null,\"mountedTableBulkActionData\":[[],{\"s\":\"arr\"}],\"tableDeferredFilters\":null,\"paginators\":[{\"shipping-recordsPage\":1},{\"s\":\"arr\"}]},\"memo\":{\"id\":\"gOCD7qyFulG39QiLU4Pv\",\"name\":\"app.filament.resources.shipping-record-resource.pages.list-shipping-records\",\"path\":\"shipping-records\",\"method\":\"GET\",\"children\":[],\"scripts\":[],\"assets\":[],\"errors\":[],\"locale\":\"zh_CN\"},\"checksum\":\"c928edcb8052630358e372c4a5d2b263a4c753230619ac404a569034acc6c382\"}","updates":{},"calls":[{"path":"","method":"mountTableAction","params":["changeStatus","74"]}]}]}' \
  --insecurewithout any noticeable lag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant