[
https://issues.apache.org/jira/browse/BEAM-12142?focusedWorklogId=580126&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580126
]
ASF GitHub Bot logged work on BEAM-12142:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Apr/21 16:46
Start Date: 09/Apr/21 16:46
Worklog Time Spent: 10m
Work Description: scwhittle commented on pull request #14498:
URL: https://github.com/apache/beam/pull/14498#issuecomment-816812591
Run Java PreCommit
--
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: 580126)
Time Spent: 40m (was: 0.5h)
> Reduce overhead of MetricsEnvironment
> -------------------------------------
>
> Key: BEAM-12142
> URL: https://issues.apache.org/jira/browse/BEAM-12142
> Project: Beam
> Issue Type: Bug
> Components: java-fn-execution
> Reporter: Sam Whittle
> Assignee: Sam Whittle
> Priority: P2
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Currently the MetricsContainer objects are stored in ThreadLocal state. This
> means that scoping a new container involves a get and a set of thread-local
> state. By instead putting a wrapper object in the thread-local state we can
> use a single-lookup in thread local state to get/set and then reset.
> This is showing up as a possible 7% cpu improvement in a nexmark query
> benchmark
> Additionally I think that removing from the threadlocal state is causing
> overhead in get calls by causing the linear probing within the implementation
> of ThreadLocal state to become more expensive.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)