Cysharp / MemoryPack

Zero encoding extreme performance binary serializer for C# and Unity.
MIT License
3.29k stars 193 forks source link

Field Limit for Classes #148

Closed BondiGeek closed 1 year ago

BondiGeek commented 1 year ago

Hi, is the field limit something that could be increased by any chance?

Severity Code Description Project File Line Suppression State Error MEMPACK017 The MemoryPackable object

member count is '359', however limit size is 249

We were looking to use MemoryPack along with linq2db and believe it or not we have 3 tables in our db with <= 370 columns.

Thanks, James

neuecc commented 1 year ago

It may be extended to ushort in the future (unions tag is so). However, currently it will remain as byte (250+reserved flag) for a while.

Kiina commented 2 months ago

Just ran into the same issue. Looking through #43 it looks like support is like 99% there. Could there be like a flag implemented that allows for ushort (while being incompatible with the byte version).

Would basically only https://github.com/Cysharp/MemoryPack/blob/main/src/MemoryPack.Core/MemoryPackCode.cs#L11-L19 need to be adjusted or am I missing something?