[ 
https://issues.apache.org/jira/browse/BEAM-13015?focusedWorklogId=733348&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733348
 ]

ASF GitHub Bot logged work on BEAM-13015:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Feb/22 21:20
            Start Date: 25/Feb/22 21:20
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #16745:
URL: https://github.com/apache/beam/pull/16745#discussion_r815162436



##########
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/BeamFnStateGrpcClientCache.java
##########
@@ -87,9 +88,12 @@ private GrpcStateClient(ApiServiceDescriptor 
apiServiceDescriptor) {
       this.apiServiceDescriptor = apiServiceDescriptor;
       this.outstandingRequests = new ConcurrentHashMap<>();
       this.channel = channelFactory.apply(apiServiceDescriptor);
+      // We use the directExecutor because we just complete futures when 
handling responses.
+      // This showed a 1-2% improvement in the 
ProcessBundleBenchmark#testState* benchmarks.
       this.outboundObserver =
           outboundObserverFactory.outboundObserverFor(
-              BeamFnStateGrpc.newStub(channel)::state, new InboundObserver());
+              
BeamFnStateGrpc.newStub(channel).withExecutor(MoreExecutors.directExecutor())::state,

Review comment:
       Done.

##########
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/BeamFnStateGrpcClientCache.java
##########
@@ -87,9 +88,12 @@ private GrpcStateClient(ApiServiceDescriptor 
apiServiceDescriptor) {
       this.apiServiceDescriptor = apiServiceDescriptor;
       this.outstandingRequests = new ConcurrentHashMap<>();
       this.channel = channelFactory.apply(apiServiceDescriptor);
+      // We use the directExecutor because we just complete futures when 
handling responses.
+      // This showed a 1-2% improvement in the 
ProcessBundleBenchmark#testState* benchmarks.
       this.outboundObserver =
           outboundObserverFactory.outboundObserverFor(
-              BeamFnStateGrpc.newStub(channel)::state, new InboundObserver());
+              
BeamFnStateGrpc.newStub(channel).withExecutor(MoreExecutors.directExecutor())::state,
+              new InboundObserver());

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 733348)
    Time Spent: 63h 20m  (was: 63h 10m)

> Optimize Java SDK harness
> -------------------------
>
>                 Key: BEAM-13015
>                 URL: https://issues.apache.org/jira/browse/BEAM-13015
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-harness
>            Reporter: Luke Cwik
>            Assignee: Luke Cwik
>            Priority: P2
>          Time Spent: 63h 20m
>  Remaining Estimate: 0h
>
> Use profiling tools to remove bundle processing overhead in the SDK harness.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to