-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[swiftSyntax] Performance improvements for deserialising ByteTrees #18888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[swiftSyntax] Performance improvements for deserialising ByteTrees #18888
Conversation
@swift-ci Please smoke test |
@@ -48,32 +48,34 @@ protocol ByteTreeObjectDecodable { | |||
/// - numFields: The number of fields that are present in the serialized | |||
/// object | |||
/// - Returns: The deserialized object | |||
static func read(from reader: ByteTreeObjectReader, numFields: Int, | |||
userInfo: [ByteTreeUserInfoKey: Any]) -> Self | |||
static func read(from reader: UnsafeMutablePointer<ByteTreeObjectReader>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why not inout ByteTreeObjectReader
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because inout ByteTreeObjectReader
still has a retain/release count associated with it.
6f3c306
to
31db50e
Compare
31db50e
to
a7942e1
Compare
@swift-ci Please smoke test and merge |
Bots were unable to clone the projects. Let's try again. @swift-ci Please smoke test and merge |
Let's see if swift-ci is working again. @swift-ci Please smoke test and merge |
@swift-ci Please smoke test |
a7942e1
to
d41af61
Compare
@swift-ci Please smoke test |
This PR contains several performance for deserialising syntax trees in binary encoding (see the separate commits):
SourceLength
a structRawSyntaxData
a direct enumByteTree(Object)Reader
a struct and pass a reference to it around using anUnsafeMutabelPointer
userInfo
through anUnsafePointer
and don't pass it around