-
Notifications
You must be signed in to change notification settings - Fork 206
Send frame diffs over instead of full frames #167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! It's a bit hard to review the exact changes though :)
client/state.cpp
Outdated
@@ -206,13 +206,28 @@ std::vector<std::string> State::update( | |||
return upd; | |||
} | |||
|
|||
void update_frame(State* state, const torchcraft::fbs::FrameData* fd) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this should be a member function?
include/frame.h
Outdated
Frame* frame_undiff(FrameDiff*, Frame*); | ||
Frame* frame_undiff(Frame*, FrameDiff*); | ||
void frame_undiff(Frame*, FrameDiff*, Frame*); | ||
void frame_undiff(Frame*, Frame*, FrameDiff*); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to provide from
and to
argument names here to emphasize the direction of the diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undiffs (addition) is commutative :)
Timing until this line on bwrep_gwhxe.rep for the first 5000 frames: With diffs: With diffs but without reserializing the frame string: Without diffs: What do we need the frame string for and can I remove it @syhw @jgehring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. You can probably remove framestring, we are not using it anymore AFAIR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bon! Please rebase before closing, though.
Now the connection also uses frame diffs instead of the full frames.
I ran clang-format on every file this change touched, so a lot of this is automatic, sorry guys :( I'll split it into 2 commits next time. module.cc wasn't really changed much except for the destructor.
In frame.h I removed all of the diff functions involving references, so we don't get an explosion of signatures that take either pointers or references,