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

faster matching of known services #2613

Merged
merged 1 commit into from
Jun 19, 2017
Merged

faster matching of known services #2613

merged 1 commit into from
Jun 19, 2017

Conversation

rade
Copy link
Member

@rade rade commented Jun 18, 2017

We hit this code a lot during rendering.

I have tested rendering performance against a recent Weave Cloud prod report. Run scope like this:

$ prog/scope --mode=app --weave=false --app.collector=file:/tmp/prod-on-dev-report.json

and then time the fetching of a topology with

$ time curl -so /dev/null http://localhost:4040/api/topology/<topology>

and then repeat for other topologies (NB: scope must be restarted in-between in order to defeat memoisation between requests).

Results (all times in seconds):

topology master branch
processes 0.14 0.11
containers 0.92 0.67
pods 0.74 0.48
services 0.72 0.45
hosts 0.76 0.47

So that's a nearly 40% improvement in some cases.

We hit this code *a lot* during rendering.
@rade rade requested a review from 2opremio June 18, 2017 15:12
@2opremio
Copy link
Contributor

Great catch @rade

@rade rade merged commit b34cfe3 into master Jun 19, 2017
@rade rade mentioned this pull request Jun 27, 2017
@rade rade deleted the faster-known-service-match branch July 5, 2017 13:08
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.

2 participants