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

Use map to optimize Entries.Diff() #2556

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@skoo87

skoo87 commented Nov 29, 2016

The Entries.Diff() cost a lot of CPU resource when a lot of Docker nodes. So use map to optimize it, may be used more memory space, but time is shortened.

一啸

@GordonTheTurtle GordonTheTurtle removed the dco/no label Nov 29, 2016

@dongluochen

This comment has been minimized.

Show comment
Hide comment
@dongluochen

dongluochen Nov 29, 2016

Contributor

@skoo87 vendor/github.com/docker/docker/pkg/discovery/entry.go is vendored from github.com/docker/docker/pkg/discovery/entry.go in docker project. If you want to make this change, you should open a PR in docker/docker to update entry.go. Then vendor it to Swarm.

Contributor

dongluochen commented Nov 29, 2016

@skoo87 vendor/github.com/docker/docker/pkg/discovery/entry.go is vendored from github.com/docker/docker/pkg/discovery/entry.go in docker project. If you want to make this change, you should open a PR in docker/docker to update entry.go. Then vendor it to Swarm.

@skoo87

This comment has been minimized.

Show comment
Hide comment
@skoo87

skoo87 Nov 30, 2016

@dongluochen Oh, Ok, I will close the PR.

skoo87 commented Nov 30, 2016

@dongluochen Oh, Ok, I will close the PR.

一啸
@GordonTheTurtle

This comment has been minimized.

Show comment
Hide comment
@GordonTheTurtle

GordonTheTurtle Nov 30, 2016

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "improve-diff" [email protected]:skoo87/swarm.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354164816
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

GordonTheTurtle commented Nov 30, 2016

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "improve-diff" [email protected]:skoo87/swarm.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354164816
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@allencloud

This comment has been minimized.

Show comment
Hide comment
@allencloud

allencloud Apr 28, 2017

Member

Any update with this ? @skoo87

Member

allencloud commented Apr 28, 2017

Any update with this ? @skoo87

@nishanttotla

This comment has been minimized.

Show comment
Hide comment
@nishanttotla

nishanttotla Jul 18, 2017

Contributor

@skoo87 can you please rebase the PR and look at the comments above.

Contributor

nishanttotla commented Jul 18, 2017

@skoo87 can you please rebase the PR and look at the comments above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment