You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2019/06/15 22:54:00 UTC

[jira] [Resolved] (DIRSERVER-1892) We don't need to clone the full entry when returning it from the backend

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

Emmanuel Lecharny resolved DIRSERVER-1892.
------------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 2.0.0)
                   2.0.0.AM26

The entry is cloned, not the attribute's value. This need to be done this way, as we will return an entry that may be modified (added attributes, removed ones)

> We don't need to clone the full entry when returning it from the backend
> ------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1892
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1892
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M15
>            Reporter: Emmanuel Lecharny
>            Priority: Major
>             Fix For: 2.0.0.AM26
>
>
> I modified the Entry.clone() method so that we don't deep clone the entry, but only the Map containing the Attributes. The unit tests are all passing, and the performance boost is clear.
> We never need to clone everything, we never modify anything in an Attribute. (And if so, it's up to the code doing that to be sure it does not modify the entry).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org