KamoCRM

A template icon is drawn through Batik once, not on every send

PerformanceEmailService
Shipped
September 28, 2026 at 9:06 PM UTC
Author
Kamo
Commit
a9b72cc

InlineImageTransport memoised a drawing only within one message, so every send that wore the compose template decoded and transcoded the same handful of social and contact icons again, synchronously in the send path (SP98-F-8). Drawn PNGs are now kept in a bounded LRU, keyed by the SHA-256 of the SVG's data: URI and the size it is drawn at: at most 256 PNGs and 8 MiB, and no PNG over 512 KiB (a sender's own large picture would only crowd out the icons). A failed drawing is not kept. The template sweep test now also pins that every drawing a template can print fits the cache, and that all of them fit at once.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing