Image transforms buffer originals twice and have no decode limit

Offen
#3,281 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
aws, azure, csharp
Bereich
backend, performance

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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).

Vorherrschende Sprache
C#
Sterne
569
Forks
107
Ø Merge
2 Std. 49 Min.
Gemergte PRs (30 T.)
397

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus fluentcms/FluentCMS

Alle Issues in fluentcms/FluentCMS

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.