Skip to content

ExecutionStepInfo optimisations - #2023

Merged
bbakerman merged 1 commit into
masterfrom
create-execution-step-improvements
Sep 8, 2020
Merged

bbakerman merged 1 commit into
masterfrom
create-execution-step-improvements

Conversation

@bbakerman

Copy link
Copy Markdown
Member

This adds lazy ExecutionStepInfo for instrumentation calls )where they MAY not ever use it) and also reduces the number of calls create them and variable resolving.

I ran this code under JProfiler and graphql.execution.ExecutionStrategy#createExecutionStepInfo showed up as a hotspot. Looking into it I see it being called a lot but for low value. I suspect some coy and paste happened here.

Anyway this is only marginally better performance

Baseline:
Benchmark                                    Mode  Cnt   Score   Error  Units
BenchMark.benchMarkSimpleQueriesThroughput  thrpt   15  38.663 ± 1.852  ops/s
BenchMark.benchMarkSimpleQueriesAvgTime      avgt   15  25.562 ± 1.043  ms/op

After:

Benchmark                                    Mode  Cnt   Score   Error  Units
BenchMark.benchMarkSimpleQueriesThroughput  thrpt   15  43.890 ± 2.094  ops/s
BenchMark.benchMarkSimpleQueriesAvgTime      avgt   15  23.282 ± 0.831  ms/op

There are NO major wins here but it doe less work AND makes the parameters lazy for instrumentation that may never use the parameters.

@bbakerman bbakerman added this to the 16.0 milestone Sep 7, 2020
@bbakerman
bbakerman requested a review from andimarek September 7, 2020 03:12
@dfa1

dfa1 commented Sep 7, 2020

Copy link
Copy Markdown
Contributor

but I look forward to see the cumulative effect of all the optimizations you made :)

@bbakerman
bbakerman merged commit 264cb12 into master Sep 8, 2020
@andimarek
andimarek deleted the create-execution-step-improvements branch May 4, 2021 21:07
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