vectorcraft/crates
dotCooCoo 4a27d897ed EPS: shading functions in shared arrays no longer hang the import
A shading's Function can be an array of functions. eval evaluated every
entry of an array and the arrays inside it, with only a depth limit. An
array of 100 entries that all refer to the same array one level down,
nested that way a few levels deep, is small in memory, but each
evaluation visited about 100^levels functions, and a gradient samples
such a function 33 times. vectorcraft-cli info on a file with four
levels of 100 shared entries had used 90 CPU seconds, with a 12 MiB
resident set, when "timeout 120" stopped it. eval also counted nothing
against the operation budget: a loop that paints an axial or radial
shading counted a few operations a pass, however many functions each
pass evaluated. On a file that paints a gradient of one Type 2 function
with N 2 in "{ sh shfill } loop", vectorcraft-cli info ran for
209 CPU seconds, and its resident set reached 4 GB before the program
ran out of the operation budget.

eval now counts the functions one evaluation visits, as linear_points
counts its nodes, and raises limitcheck past 257. The PostScript
Language Reference defines a shading's function as one function
dictionary or an array of one for each color component. The reader
allows 32 components, and the depth limit allows each entry a chain of
8 functions. An array with more entries than the visits left raises
limitcheck before it is copied. Each function visited counts 8
operations against the budget: one visit took as long as 6 to 10
operations, measured with loops of pop and of a name lookup.

Tests: a shading over four levels of 100 shared entries raises
limitcheck, and the square drawn before it stays; a shading over one
array of 256 entries is drawn as a gradient, and one over 257 entries
raises limitcheck; a program that paints 2000 shadings over the
256-entry array runs out of the operation budget. The test reads each
program but the last on a thread of its own and fails when no result
arrives within 20 seconds.
2026-10-12 09:43:15 +07:00
..
affinity Clippy 1.99: as_chunks in the Affinity raster tests 2026-10-09 23:15:36 +07:00
brush #1172: share an object's appearance with its undo history until it changes 2026-10-11 23:27:21 +07:00
cad fix(cad): set the closed bit on DXF SPLINE entities so closed curves import into CAM (#1299) 2026-10-12 08:53:36 +07:00
color Review: palette writing keeps the swatches PaletteFormat::holds names; ROADMAP (#1110) 2026-10-11 11:33:07 +07:00
doc Links: Find in Folder… looks for missing linked files in a folder and its subfolders 2026-10-12 08:16:41 +07:00
effects G2: add Artistic Film Grain live effect 2026-10-12 07:26:05 +07:00
engine Select: Select All skips hidden isolated groups, and menu commands stay within what it selects 2026-10-12 09:05:14 +07:00
eps EPS: shading functions in shared arrays no longer hang the import 2026-10-12 09:43:15 +07:00
format Graph designs and marker designs: Object › Graph › Design… and Marker… 2026-10-12 06:42:49 +07:00
geom #1111: a blend's spine bends into a curve 2026-10-11 17:49:41 +07:00
mcp MCP: lost replies report uncertainty instead of replaying edits 2026-10-12 06:59:49 +07:00
metafile Part of #637: the editing data's structure read whole, colours, gradients, transparency, names, images and artboards included 2026-10-09 16:02:36 +07:00
pathops Shape Builder: a line's loose end past a crossing no longer runs out and back in most cases 2026-10-12 00:16:22 +07:00
pdf TEST.1: correct font shaping and embedding oracles 2026-10-12 06:59:49 +07:00
plugins Review: a whole number past i64::MAX is past any maximum; ROADMAP (#1091) 2026-10-11 12:24:46 +07:00
render perf: テクスチャ効果の距離判定を軽くする #1257 2026-10-12 07:25:58 +07:00
svg SVG.1: preserve data attributes and validate export ranges 2026-10-12 06:59:49 +07:00
testkit variables: fix binding lifetime, dataset editing and the missing UI to define 2026-10-10 23:34:21 +07:00
text Type: Proportional Metrics bring their kerning — `apkn` with `palt`, `vkrn` and `vapk` with `vpal` (#966) 2026-10-12 07:25:55 +07:00
three-d M9: add live Revolve with artboard rotation and lighting controls 2026-10-10 23:44:46 +07:00
tools Merge pull request #1313 from itrycodinganditsbad/fix-1274 2026-10-12 08:20:33 +07:00
trace Image Trace: an oversized image decodes within the allocation its 192 megapixel limit needs (512 MB on the web) 2026-10-12 08:23:19 +07:00
ui-egui Plug-ins: share the whole-number field test harness 2026-10-12 09:21:30 +07:00