Optimize in-memory representation of string and datetime columns - #764
Optimize in-memory representation of string and datetime columns#764senderista wants to merge 7 commits into
Conversation
…erialize string column protobuf msg into packed byte array with offsets.
|
@jingjingwang: So I've noticed that although I can avoid copying from a protobuf msg by stealing the |
|
I think saving one direction is definitely better than not saving :) Plus the code looks neat so I don't see any reason not to do it. I also have concern on using a protobuf specialized datatype in |
|
I now think I should generalize the issue/PR into creating zero-copy (buffer-stealing) versions of all column types, so a column of any type can be serialized/deserialized from a protobuf msg with no buffer copy (by keeping all data in a |
|
Sounds like it's going to be a big change! I'm not completely sure how the code will look like after the zero-copy change, but if it's doable then looks great. One concern is how do we handle |
|
@jingjingwang what do you think of this PR after a year? :) How high a priority do you think it should be to avoid storing objects in String and DateTime columns? Not sure what memory savings this would really yield, but it seems like memory usage is currently a big issue for Myria users. |
|
According to the discussion above, we were planing to add zero-copy to this PR. Could you add this improvement (if you plan to) and also clean the PR up? I can review it after it's up-to-date. |
This will proceed in two stages:
STRING_TYPEorDATETIME_TYPEcolumns into new packedColumnimplementationsColumnBuilderimplementations that build these packedColumnimplementations, possibly adding a new append-onlyColumnBuilderinterface (since the packed string representation can't efficiently replace/swap by row index)Fixes #762