mirror of
https://github.com/storytold/craft-libs.git
synced 2026-12-01 18:56:30 +01:00
The first call to builtins() parsed the twelve embedded theme files with format::parse, which resolves every layer of each theme in both modes to look for reference cycles. That took 23.8 ms (median of 15, release build) once per process, the first time an app reads a theme. builtins() now parses the files with format::parse_builtin, which skips the cycle search: 0.25 ms. A new test runs the full format::parse on every embedded file, so a built-in with a cycle still fails the tests, and another counts the cycle searches while loading (12 before, 0 now).