Image transforms buffer originals twice and have no decode limit

Đang mở
#3,281 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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/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, azure, csharp
Lĩnh vực
backend, performance

Hướng nghiên cứu

Start with MediaTransforms.cs around lines 159 and 179, then trace the full-size decode in SkiaImageProcessor and the AI alt-text path that shares it. The proposal names several coordinated changes, including buffering, single-flight requests, a decode semaphore, and downscaled decoding. Done means concurrent requests for one cold variant decode once and decodes are capped per instance.

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

Mô tả

performance plugin type:bug

Problem

MediaTransforms.RenderAsync (MediaTransforms.cs:159,179) opens the source twice; on S3 and Azure each open buffers the whole file. The full-size decode in SkiaImageProcessor allocates up to about 200 MB at the default MaxSourcePixels, and nothing caps concurrent decodes or deduplicates requests for the same variant, so a burst of first visits can exhaust memory. The AI alt-text path uses the same code.

Proposal

Use the stored dimensions instead of the first read, spool non-seekable sources once to a temporary file, single-flight per variant, a global decode semaphore, and decode downscaled when the target is much smaller.

Acceptance

  • Concurrent requests for one cold variant decode once
  • Decodes are capped per instance

Found in the code review of 17 Nov 2026 (P2).

Ngôn ngữ chính
C#
Star
569
Fork
107
Merge trung bình
2 giờ 49 phút
Pull request đã merge (30 ngày)
397

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

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 fluentcms/FluentCMS

Tất cả issue của fluentcms/FluentCMS

Issue tương tự

Thêm issue về C#

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.