Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Sync. #13

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

nishantshreshth
Copy link
Contributor

Fixing sync so that after each sync we get same states. The state must represent the previous other driver.For producing proper changes.

#Their state must be populated with the content of our driver.
#FIXME:Later on, update their state with metadata of our Driver messages.
for message in self.driver.search():
self.theirState.update(message)
Copy link
Member

Choose a reason for hiding this comment

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

This would harm perfs. We are making a new full read of the other side (twice since from each side)!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nicolas if I will go asymptotic way the reading once will have complexity O(n) and reading it twice O(2n) = O(n). So perfomance won't be affected that much. The previous way of upating stage had bug.

Copy link
Member

Choose a reason for hiding this comment

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

Trust me. Reading each driver twice will definelty harm perfs.
It's not about algo complexity. It's about I/O.

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.

3 participants