mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Object::get scanned the field vector linearly. An Affinity file can define one large shared object and reference it repeatedly as sibling layers, so repeated property lookups multiplied into quadratic CPU work without the fields appearing more than once in the file. Build a first-occurrence tag index when an object's fields are set (via Object::new and set_fields, the latter covering the root object that is filled after it is pushed). Positional fields (tag 0) stay out of the index, and first-match semantics are preserved. Finding: c315c4b0-dceb-459e-b39a-fa9c68ae6f40 (CWE-407)