Asset performance on large and remote containers
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- backend, performance
Rechercherichtung
This is a parent issue covering asset listing and meta generation, with related work in AssetContainerContents::all(), Asset::exists(), Asset::generateMeta(), Imaging\Attributes::from(), and InsertMultipleJob. Start by following the linked issues and pull requests, especially #15610, #15609, and #15934, then measure the remaining cases on Statamic 6.x with those changes applied. Done means identifying which unchecked performance problems remain and addressing them as separate changes.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Bug description
Parent issue tying together the open asset performance reports and the PRs that address them. They come down to two separate root causes, which overlap in #14061.
A. Everything goes through the full container listing
AssetContainerContents::all() caches the whole recursive Flysystem listing of a container, and most asset operations load all of it, even to answer a question about one file. With the Stache watcher enabled ttl() returns 0, so the listing is rebuilt constantly, which on a remote disk means repeated LIST calls.
- #15608 — the cached listing includes every
.metasidecar, roughly doubling its size. PR: #15610 - #15607 —
Asset::exists()loads the whole listing to check one file. PR: #15609 (stacked on #15610) - #6495 — slow pages with many assets. Much of the Stache query cost reported there has since been addressed (#13952, #15669, #15877, #15894), and #15609 covers the
exists()/metaExists()scan. Needs re-measuring on6.xwith #15610 and #15609 applied; close if flat, otherwise port what remains of thestache-tweaksbranch mentioned there (storing prefixed keys inIndexso they aren't rebuilt per query). -
ttl()of0with the watcher on causes repeated listings on remote disks (reported in #14061, also likely behind #11949). No PR yet.
Related: #11998 moves meta off the container disk entirely.
B. Generating meta downloads the whole file
Asset::generateMeta() needs dimensions/duration, and on a remote disk that means pulling the full object.
- #8626 — large video on S3 ties up workers. PR: #15934 (ranged reads for audio/video)
- Images are still copied whole to read their dimensions (
Imaging\Attributes::from()). No PR yet. - #14061 —
InsertMultipleJobregenerates meta for every asset when the meta cache is empty, times out, retries and downloads everything again. Needs the two items above plus thettl()item in A, and the retry loop looked at. No PR yet.
How to reproduce
See the individual issues. The common setup is a container with tens of thousands of files, most visibly on S3.
Logs
No response
Environment
Statamic 6.x. See the individual issues for specifics.
Installation
Existing Laravel app
Additional details
Suggested order: #15610, then #15609, then re-measure #6495. #15934 is independent of group A. The remaining unchecked items without a PR would each be their own small PR.
- Vorherrschende Sprache
- PHP
- Sterne
- 4.9k
- Forks
- 647
- Ø Merge
- 1 T. 45 Min.
- Gemergte PRs (30 T.)
- 221
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus statamic/cms
-
forms ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
antlers
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
Nav: link to the site root with an anchor (/#section) gets is_parent on every pageEvtl. vergeben @duncanmcclean hat das heute übernommen. Offennavigations
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
Multiple Choice and Checkboxes no longer offer "Inline", but the default views still use itEvtl. vergeben @duncanmcclean hat das heute übernommen. Offenforms
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
sync-en
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag
-
Selection on a line without a docblock tag drops trailing characters (data provider attribute)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
vimeo/psalm#15150 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
taskforcesh/bullmq#5238 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] v-change-database-password reports success but doesn't change the password when MySQL validate_password rejects itEvtl. vergeben @bfs2021 hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Automattic/jetpack#55517 ·
Maintainer antworten meist innerhalb von 1 Tag