-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Labels
perfRelated to runtime performanceRelated to runtime performance
Description
A colleague asked about this and I think it can be a good idea, and I don't know if this was considered before.
Message, map, packed repeated, and string fields can be lazily deserialized as their encoding have a length prefix so we can efficiently skip over those fields and copy the encodings to deserialize later.
(Instead of copying encodings, we could store a view into the original buffer, though that would keep the entire buffer alive until all of the lazy fields (including those in nested fields) are deserialized.)
This can improve app startup as we delay some of the deserialization costs to field access time.
Since _FieldSet already holds dynamic elements it shouldn't be too much worse to add another value class.
Metadata
Metadata
Assignees
Labels
perfRelated to runtime performanceRelated to runtime performance