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

Replace linked list/deque in server loop with plain array #11

Closed
TheHashTableSlasher opened this issue May 19, 2020 · 3 comments
Closed
Labels
good first issue Good for newcomers optimization Improvements to code quality or efficiency server Relates to the server code

Comments

@TheHashTableSlasher
Copy link
Collaborator

Instead of using a queue proper, we can just use a dynamic array and clear it every time we read from it (since all inputs are consumed at once)

@TheHashTableSlasher TheHashTableSlasher added optimization Improvements to code quality or efficiency server Relates to the server code good first issue Good for newcomers labels May 19, 2020
@TheHashTableSlasher
Copy link
Collaborator Author

Actually, if we wish to re-implement the ability to get only the first n updates from the server, this may not be such a good idea. Thoughts? @cuihantao

Relevant feature in original DiME:

% Checks to see if there are any messages from the server and receives up to
% max_msg messages. If not specified, max_msg defaults to 3.
d.sync()
d.sync(max_msg)

@cuihantao
Copy link
Collaborator

In use cases, we will always read the first n variables in the queue (or the storage), as described.

@TheHashTableSlasher
Copy link
Collaborator Author

Okay, in that case I will close this and open a new issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers optimization Improvements to code quality or efficiency server Relates to the server code
Projects
None yet
Development

No branches or pull requests

2 participants