HeapsIO / hxbit

Haxe Binary serialization and network synchronization library
155 stars 30 forks source link

Circular references #37

Closed filt3rek closed 5 years ago

filt3rek commented 5 years ago

Hej Nicolas,

I try to use the hxBit Serializer instead of the haxe.Serializer to pass objects from server to client. I have circular references (contact has companies which have contacts...) and there's no cache as I can see. I have some questions : -Do you think it's a good idea to use hxBit for that ? You say hxBit Serializer is faster than haxe.Serializer, so I wanted to test it. -If yes, could a cache be implemented, to pass objects by references as the haxe.Serializer do ?

ncannasse commented 5 years ago

There's a cache, that's why we have objects __uid in the first place.

filt3rek commented 5 years ago

Is the cache set by default ? I have circular references and it seems to loop. And also there was another question : -Do you think it's a good idea to use hxBit for that ? You say hxBit Serializer is faster than haxe.Serializer, so I wanted to test it.

filt3rek commented 5 years ago

I apologize, cache works fine, sorry for that.