-
-
Notifications
You must be signed in to change notification settings - Fork 587
Description
Bug description
We have a client with a large number of files on their Statamic website. We use asset container with an S3 bucket to host the files (around 13 GB). Whenever we use the assets fieldtype on a page and select around 10 images, the page becomes painfully slow (50 seconds to load) and the request payload grows significantly (up to 20 MB).
We’ve pinpointed that the slowdown occurs while fetching the assets, specifically in the extractFromFields function within the ExtractsFromEntryFields trait, is this a known issue?
How to reproduce
Set up an asset container with S3:
-
Configure an S3 asset container in Statamic (e.g., assets).
-
Ensure the bucket contains a large number of files (e.g., 10,000+ images, ~13 GB total).
Create a collection or page blueprint:
- Add an Assets fieldtype (e.g., images) allowing multiple selections.
- Edit an entry or page:
- Open the entry editor in the Statamic CP.
Use the assets field to select around 10 images from the S3 container.
Expected Behavior
Selecting a handful of assets (even in a large S3 container) should not cause a significant delay or a large payload.
Page load and save times should remain fast and payload sizes reasonable.
Logs
Environment
Environment
Application Name: *****
Laravel Version: 11.46.0
PHP Version: 8.3.24
Composer Version: -
Environment: production
Debug Mode: OFF
URL: *****
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / daily
Mail: ***
Queue: redis
Session: file
Livewire
Livewire: v3.6.4
Statamic
Addons: 2
Sites: 2
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.65.1 PRO
Statamic Addons
statamic/eloquent-driver: 4.31.0
Statamic Eloquent Driver
Asset Containers: file
Assets: eloquent
Blueprints: file
Collection Trees: eloquent
Collections: file
Entries: eloquent
Fieldsets: file
Form Submissions: eloquent
Forms: eloquent
Global Sets: file
Global Variables: eloquent
Navigation Trees: eloquent
Navigations: file
Revisions: file
Sites: file
Taxonomies: file
Terms: eloquent
Tokens: fileInstallation
Existing Laravel app
Additional details
No response