Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Let relcast do term serialization, if needed #1771

Merged
merged 4 commits into from
Jul 14, 2022
Merged

Conversation

Vagabond
Copy link
Member

@Vagabond Vagabond commented Jul 7, 2022

Relates to helium/relcast#50

@@ -463,7 +462,7 @@ deserialize(#{sk := SKSer,
case StateMap of
#{K := V} when V /= undefined andalso
V /= Bundef ->
binary_to_term(V);
V;
_ when K == sig_phase ->
sig;
_ when K == seen ->

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're ignoring these fields in deserialize do we need to serialize them in the first place? Skipping these fields in serialize will reduce the number of field-by-field compares in relcast.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its populating the default values if they're not defined.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I get it now. The first case clause checks for undefined and falls through to the others if it is.

@evanmcc evanmcc merged commit 8076104 into master Jul 14, 2022
@evanmcc evanmcc deleted the adt/relcast-serializing branch July 14, 2022 00:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants