mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We have finally reached our goal of optimising deferred node creation for SyntaxTreeCreator. Instead of creating dedicated deferred nodes and copying the data into a RawSyntax node when recording, we always create RawSyntax nodes. Recording a deferred node is thus a no-op, since we have already created a RawSyntax node. Should a deferred node not be recorded, it stays alive in the SyntaxArena without any reference to it. While this means, we are leaking some memory for such nodes, most nodes do get recorded, so the overhead should be fine compared to the performance benefit.
19 KiB
19 KiB