Repository navigation
Added
- PHP 8.6 prebuilt binaries: Linux glibc (x86_64, arm64) and macOS arm64 builds compiled against 8.6.0, and Windows DLLs (NTS + TS, x64 + x86).
Fixed
-
On PHP builds that defer memory-limit errors (
ZEND_HAS_OOM, present in 8.4.27, 8.5.12, and 8.6.0, for example), a render that runs pastmemory_limitnow stops with the usual "Allowed memory size exhausted" fatal error instead of terminating the PHP process. Before, an SVG build or the PNG/JPEG/WebP encoder kept appending output past the limit, and a raster frame larger than twicememory_limit(an 8192x8192renderPng()at the default 128M, for example) was allocated in one step, so each of them could reach the engine's hard memory limit, where PHP exits with status 137 and no shutdown. Under FrankenPHP or another threaded SAPI, that ended every request the process was serving. A rasterrenderToFile()that hit the limit also left its temporary file behind. -
A ZTS process no longer crashes at module shutdown when worker threads exit without calling
ts_free_thread(), as embed-SAPI hosts can. PHP then runs fastchart's globals destructor for each of those threads from the main thread, and the destructor released the calling thread's FreeType state and caches instead of the ones it was handed. -
Vendored plutovg and qrcodegen code is built with
-DNDEBUG, matching their release builds, so a failed internalassert()no longer callsabort(). Under a threaded SAPI, one such abort ended every request the process was serving. -
NetworkChart reads
FASTCHART_NETWORK_SCALARunder PHP's environment lock, so a concurrentputenv()in another ZTS thread can no longer race the lookup. -
ParetoChart, MarimekkoChart, and ViolinPlot honor X-axis visibility for category labels; ParetoChart also honors Y-axis visibility for both scales and their grid lines, without hiding data labels or changing plot geometry.
-
ViolinPlot honors
setTitleColor(), including black and the-1text-color/theme fallback, without recoloring group labels or median lines. -
ViolinPlot honors
setAxisFont(),setAxisLabelColor(), andsetXLabelStride()for group labels. Group labels no longer usesetLabelFont(); chart-wide font and text-color fallbacks are unchanged. -
ParetoChart and MarimekkoChart honor
setXLabelStride()for category labels without changing bar values, segment labels, or chart geometry. -
ParetoChart honors
setAxisLabelColor()for its value, percent, and category tick labels, and MarimekkoChart for its column labels, including the-1text-color/theme fallback. -
ParetoChart honors
setAxisFont()for both Y axes and category labels, and MarimekkoChart for column labels. Bar values and segment text continue to usesetLabelFont(); chart-wide font defaults are unchanged. -
VectorChart honors
setAxisLabelColor()for both X and Y tick labels, including the-1text-color/theme fallback. -
WordCloud honors background images and omits the canvas fill when a custom plot rectangle is used for compositing.
-
Heatmap honors
setTitleColor(), including black and the-1text-color/theme fallback, without changing automatic cell-label contrast. -
Preserve ViolinPlot bandwidth for small spreads around large finite offsets.
-
Preserve proportional PolarChart geometry for large finite radii, including rose wedges and vector endpoints.
-
Honor
setTitleColor()in ArcDiagram, BulletChart, CalendarHeatmap, ChordDiagram, CirclePacking, Dendrogram, Funnel, LinearMeter, MarimekkoChart, NetworkChart, ParetoChart, Partition, Pictogram, PopulationPyramid, SankeyChart, SerpentineTimeline, SunburstChart, Treemap, VectorChart, VennDiagram, and WordCloud, including black and the-1text-color/theme fallback.
Performance
-
WordCloud SVG renders of 60-256 words take 36-90% less time (Linux x86-64; GCC 12.2/14.2, Clang 18.1) by skipping spiral steps a placed word or the plot edge already rules out. Output is unchanged, budget cut-off included.
-
CirclePacking computes each spiral slot's direction once per sibling group and resumes each slot's overlap scan at the lowest sibling that overlapped that slot for an earlier sibling, instead of rescanning from the largest sibling at every step. Siblings are sorted by descending radius, so a lower sibling that did not overlap a slot cannot overlap it for a later one. Output is byte-identical, including groups past the 8M collision-work budget, which still counts every test the full scan would make. SVG renders of 50 to 2,000 leaves take 50-89% less time; 800x800 PNG renders take about 3% less. Each group of two or more siblings allocates 20 bytes per spiral step reached, in blocks of 256 steps doubled as needed (at most 5.2 MB at the 200,000-step cap), freed before the next group.
-
The rasterizer's cell lookup starts at one of the row's last two found or inserted cells instead of the row head when the outline has at least 64 points and the band has at most twice the pool's band-size rows (every
svgTo*()band; charts taller than about 6,800 px can have one taller band). Output is byte-identical. Dense 1200x600 line charts take 10-27% less time, a dense area chart 8% less; sparse line, scatter and small charts and documents change by -5% to +3%. ThesvgTo*()render-work budget still charges each step of the lookup walk, at most 32 per lookup, now counted from where the walk starts: documents whose rows many edges cross can cost less, and some that exceeded the 2.2G-unit cap now render (left-to-right one-pixel stripes, dense zigzags, large random polygons). Refusing a document that still exceeds it can take up to 17% more time. Outlines of more than 512 points allocate up to 17% more raster pool memory (at most 1.4 MB more), as do out-of-memory retries for any outline, including outlines of 512 points or fewer and outlines under 64 points that never use hints; each raster call uses 5.4 KB more stack. -
NetworkChart's first layout of a 50- to 512-node network takes 10% to 28% less time on Linux x86-64 (GCC 11 to 14, Clang 18). Output is unchanged.
-
SankeyChart retains link storage only for accepted entries after filtering. Parsing still initially allocates for all supplied entries; filtering and rendering are unchanged.
-
ArcDiagram, ChordDiagram and NetworkChart retain link storage only for accepted entries after filtering, instead of retaining space for every supplied entry. Parsing still initially allocates for all supplied entries; filtering rules are unchanged.
-
SankeyChart computes longest-path node layers with one topological traversal instead of repeatedly rescanning all links. Layer assignment, cycle rejection, and rendered node and ribbon order are unchanged.
-
GaugeChart retains storage only for accepted zones rather than all 16 possible zones. Empty or entirely filtered zone lists need no heap allocation.
-
Code128 subset C encoding consumes each digit run without rescanning the remaining digits after every pair. Encoded bars are unchanged.
-
CalendarHeatmap locates month labels with one date conversion per week instead of scanning each day. Label placement and rendered output are unchanged.
-
QrCode scores each of its eight candidate masks in one pass instead of four module-by-module passes, and builds each mask once instead of applying and undoing it module by module. The chosen mask and rendered output are unchanged.