You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2016/03/31 13:39:25 UTC

[jira] [Updated] (IGNITE-2513) Review ThreadLocal.remove() usages.

     [ https://issues.apache.org/jira/browse/IGNITE-2513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Ozerov updated IGNITE-2513:
------------------------------------
    Labels: performance  (was: )

> Review ThreadLocal.remove() usages.
> -----------------------------------
>
>                 Key: IGNITE-2513
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2513
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: general
>    Affects Versions: 1.5.0.final
>            Reporter: Vladimir Ozerov
>            Assignee: Vladimir Ozerov
>            Priority: Critical
>              Labels: performance
>             Fix For: 1.6
>
>
> *Problem*
> We have lots scenarios when TL.set(...) is accompanied with TL.remove(). Once TL entry is removed, next set(...) invocation will cause creation of new inner entries, thus generating garbage.
> *Solution*
> Use TL.set(null) instead of TL.remove(). 
> *CAUTION!* This applies only to static TLs and TLs on rarely created objects (e.g. contexts). This optimization should not be applied to non-static TLs of frequently created objects because it will lead to excessive grow of internal TL map.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)