Location: Sources/SwiftiomaticKit/Support/Context.swift:57-74
Context declares 17 lazy var properties for compact-pipeline rule state. Each lazy access compiles to a per-property branch + atomic init flag check on every access.
Potential performance benefit
For hot rules accessed thousands of times per file, the per-property lazy gating adds up. Replacing with optional let initialized in Context.init only when the matching rule is enabled (using P1's enabledRules) gives a single nil check on access and skips initialization for disabled rules entirely.
Reason deferred
Mechanical refactor across 17 sites; needs P1 already landed (which it now is). Easy follow-up but bundling more state-init logic into Context.init warrants its own PR with measurements showing the lazy gating is actually visible in profiles.
👾 This issue is managed by Jig. Edits made here will be overwritten.
Location:
Sources/SwiftiomaticKit/Support/Context.swift:57-74Contextdeclares 17lazy varproperties for compact-pipeline rule state. Eachlazyaccess compiles to a per-property branch + atomic init flag check on every access.Potential performance benefit
For hot rules accessed thousands of times per file, the per-property lazy gating adds up. Replacing with optional
letinitialized inContext.initonly when the matching rule is enabled (using P1'senabledRules) gives a single nil check on access and skips initialization for disabled rules entirely.Reason deferred
Mechanical refactor across 17 sites; needs P1 already landed (which it now is). Easy follow-up but bundling more state-init logic into
Context.initwarrants its own PR with measurements showing the lazy gating is actually visible in profiles.👾 This issue is managed by Jig. Edits made here will be overwritten.