This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 843
Improve servicePort validation performance. #4115
Merged
aquamatthias
merged 2 commits into
d2iq-archive:master
from
jmlvanre:port-validation-perf
Jul 20, 2016
Merged
Improve servicePort validation performance. #4115
aquamatthias
merged 2 commits into
d2iq-archive:master
from
jmlvanre:port-validation-perf
Jul 20, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We keep track of the total number of ports to support an | ||
// early exit condition. | ||
var ports: Int = 0 | ||
var merged: mutable.MultiMap[Int, AppDefinition.AppKey] = |
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.
I don't believe you need the type annotation. Also, please add the "import collection.mutable" as a fully qualified import - preferably to the top of the file - e.g. "import scala.collection.mutable"
A few minor issues (except the 'A' conflicts with itself, which I'd hope AppDef would validate). |
jmlvanre
force-pushed
the
port-validation-perf
branch
from
July 19, 2016 18:26
e457607
to
1098fee
Compare
// Otherwise we find all ports that have more than 1 app | ||
// interested in them. | ||
var groupViolations = Set.empty[RuleViolation] | ||
for ((port, apps) <- merged) { |
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.
add the if statement to the for loop
jmlvanre
force-pushed
the
port-validation-perf
branch
from
July 20, 2016 10:03
1072acc
to
75e1514
Compare
Thanks! |
aquamatthias
pushed a commit
that referenced
this pull request
Jul 20, 2016
* Improve servicePort validation performance. * Clean up loops. Improve error message.
unterstein
pushed a commit
that referenced
this pull request
Jul 25, 2016
* Improve servicePort validation performance. * Clean up loops. Improve error message.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This does a single scan over the app definitions.
Benchmarks (both before and after) include a patch pending from @mpark that reduces dependency graph calls.
Starting with 2000 apps, launching the next 100 sequentially:
Before:
run1: 2m 07s
run2: 2m 23s
After:
run1: 0m 24s
run2: 0m 23s
Starting with 5000 apps, launching the next 100 sequentially:
Before:
run1: 13m 02s
After:
run1: 0m 50s
run2: 0m 54s