Skip to content

Unify input serialization and input dictionary logic (e.g. validation)#266

Closed
TheYellowArchitect wants to merge 12 commits intofoxssake:mainfrom
TheYellowArchitect:input-unification
Closed

Unify input serialization and input dictionary logic (e.g. validation)#266
TheYellowArchitect wants to merge 12 commits intofoxssake:mainfrom
TheYellowArchitect:input-unification

Conversation

@TheYellowArchitect
Copy link
Copy Markdown
Contributor

@TheYellowArchitect TheYellowArchitect commented Aug 31, 2024

Followup to #264

The only difference from the above is 1 commit: fe788ea

Started as an input serialization optimization. Instead of having the tick timestamp for each input in a serialized batch, the tick timestamp is contained exclusively at the start of the batched inputs, at its first 4 bytes (0,1,2,3)

Then I continued after remembering the state logic for serialization, which has the deserialized logic invoke the old state logic. So for states, validation and processing ends up happening in the same codeblock.

This was not true for input logic. Serialization/Deserialization of inputs was completely seperate from dictionary input logic. So for input deserialization, there was no validation like there is for input dictionary.

In case the above sounds vague, let me give the synopsis of this PR:

  • Less input code
  • Input validation and input application happens in the same codeblock. Easier to scale :)
  • Simpler input code (input batching of dictionary happens like serialization, and is sent in the format of _inputs[tick][properties] instead of _inputs[properties][tick])
  • Input serialization is optimized by omitting useless tick timestamps

…r validation and for input batch count. Also makes raw input logic more intuitive and to match the _inputs. That is [tick][properties] instead of [properties][tick]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant