mirror of
https://github.com/penpot/penpot.git
synced 2026-11-05 01:20:38 +00:00
At some point the code around this changed, I believe this used to reduce over file ids. However today it reduces over entire library maps, so it passes a map instead of an id to `dm/get-in files`. This then hashes the library which forces it to decode all of its shapes, and then it fails to lookup the data. So the component/colors/typography counts were always returning 0. Using reduce-kv fixes this, and we can just get the library data directly with `(:data library)`. On the backstage file in penpot-files this brings the time to the telemetry snapshot down from 3.8s to 1.5s AI-assisted-by: claude-5.5-sonnet Co-authored-by: Andrey Antukh <niwi@niwi.nz>