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

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

                Author: ASF GitHub Bot
            Created on: 25/May/21 14:02
            Start Date: 25/May/21 14:02
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on a change in pull request 
#14879:
URL: https://github.com/apache/beam/pull/14879#discussion_r638817397



##########
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/PCollectionConsumerRegistry.java
##########
@@ -18,6 +18,7 @@
 package org.apache.beam.fn.harness.data;
 
 import com.google.auto.value.AutoValue;
+import com.google.common.collect.ImmutableList;

Review comment:
       Use our vendored guava. Caught by dependency analysis:
   
   ```
   06:58:02 Execution failed for task 
':sdks:java:harness:analyzeClassesDependencies'.
   06:58:02 > Dependency analysis found issues.
   06:58:02   usedUndeclaredArtifacts: 
   06:58:02    - com.google.guava:guava:30.1-jre@jar
   06:58:02 
   ```
   
   And this is also the checkstyle failure.




-- 
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.

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


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

    Worklog Id:     (was: 601743)
    Time Spent: 0.5h  (was: 20m)

> Optimize PCollectionConsumerRegistry$MultiplexingMetricTrackingFnDataReceiver
> -----------------------------------------------------------------------------
>
>                 Key: BEAM-12402
>                 URL: https://issues.apache.org/jira/browse/BEAM-12402
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-harness
>            Reporter: Sam Whittle
>            Assignee: Sam Whittle
>            Priority: P2
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> In Nexmark benchmark profile this was using 2% of cpu on
> AbstractMapBasedMultimap$WrappedCollection$WrappedIterator
> methods.
>  I believe this is due to the list returned here being a wrapper around the 
> multiset.
> https://github.com/apache/beam/blob/8463a054c1d7e2b7ee8d11e9569e065cb5e02196/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/PCollectionConsumerRegistry.java#L172
> We iterate over this list many times for counters. It appears that we don't 
> need a wrapped list as it is documented that all consumers should be 
> registered first.  So it seems we can just create a copy there to an 
> immutable list and trivially save that cpu.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to