You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/19 13:20:26 UTC
[jira] [Commented] (BEAM-560) In JAXBCoder, use a pair of
ThreadLocals to cache Marshaller/Unmarshaller
[ https://issues.apache.org/jira/browse/BEAM-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15829903#comment-15829903 ]
ASF GitHub Bot commented on BEAM-560:
-------------------------------------
GitHub user vectorijk opened a pull request:
https://github.com/apache/beam/pull/1795
[BEAM-560] Use ThreadLocal to cache Marshaller/Unmarshaller
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
- [X] Make sure the PR title is formatted like:
`[BEAM-<Jira issue #>] Description of pull request`
- [X] Make sure tests pass via `mvn clean verify`. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
- [X] Replace `<Jira issue #>` in the title with the actual Jira issue
number, if there is one.
- [ ] If this contribution is large, please file an Apache
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
---
same as PR title
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vectorijk/beam BEAM-560
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/1795.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1795
----
commit 94b2ee8e52f39e8ced7186869a6147e716338d8d
Author: Kai Jiang <ji...@gmail.com>
Date: 2017-01-19T13:06:13Z
[BEAM-560] Use ThreadLocal to cache Marshaller/Unmarshaller
----
> In JAXBCoder, use a pair of ThreadLocals to cache Marshaller/Unmarshaller
> -------------------------------------------------------------------------
>
> Key: BEAM-560
> URL: https://issues.apache.org/jira/browse/BEAM-560
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Thomas Groh
> Assignee: Davor Bonaci
> Priority: Minor
> Labels: easyfix, starter
>
> Marshallers and Unmarshallers are created per-element. Instead, they can be created per-thread and stored within a ThreadLocal which creates a new instance on calls to initialValue(), which allows them to be reused for all elements encoded or decoded by the coder.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)