You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does flatbuffers serialize empty fields in output as well if it's not specified?
No, if a field is not set (or if there's a default and its set to the default) then we do not serialize the field.
There is a 2byte overhead in the vtable but that's amortizable by vtable sharing.
If not, possible to implement in the next version of flatbuffers?
See #5875 for ideas on further evolution of Flatbuffers.
Actually you might be referring to the 2byte vtable overhead here. In which case, I guess "yes, a little" is a better answer to the title question. We'd have to change how vtables work to get rid of the overhead: We index into the vtable with the field-id to find the offset to the field's value and if we choose not to write anything when the field is not present, we'd have to do something more complex than indexing and probably would trade away some speed.
Wondering if total size generated can be lowered if it is able to ignore empty fields and not serialize the "header" key value.
If not, possible to implement in the next version of flatbuffers?
The text was updated successfully, but these errors were encountered: