Asset performance on large and remote containers

Đang mở
#15,970 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@edalzell đang làm issue này rồi.

Từ ngày 20/11/2026.

  • #15979 của @edalzell — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
aws, laravel, php
Lĩnh vực
backend, performance

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

assets performance
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 .meta sidecar, 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 on 6.x with #15610 and #15609 applied; close if flat, otherwise port what remains of the stache-tweaks branch mentioned there (storing prefixed keys in Index so they aren't rebuilt per query).
  • ttl() of 0 with 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 — InsertMultipleJob regenerates meta for every asset when the meta cache is empty, times out, retries and downloads everything again. Needs the two items above plus the ttl() 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.

Ngôn ngữ chính
PHP
Star
4.9k
Fork
647
Merge trung bình
1 ngày 45 phút
Pull request đã merge (30 ngày)
221

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của statamic/cms

Tất cả issue của statamic/cms

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.