You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2015/01/14 11:17:35 UTC

[jira] [Comment Edited] (SLING-4307) Avoid caching JCR property values

    [ https://issues.apache.org/jira/browse/SLING-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276736#comment-14276736 ] 

Felix Meschberger edited comment on SLING-4307 at 1/14/15 10:17 AM:
--------------------------------------------------------------------

Looking at the JcrPropertyMapCacheEntry I think we can do away with not caching the Property object. The Property object is only needed to know about whether the Property is multi-value or not. This could be done by just a flag field.

In addition you might add a JcrResourceUtil.toJavaObject method to take the multi-value flag and the array of values to convert to supercede the use of the JcrResourceUtil.toJavaObject(Property) call.

Yes, not caching the Property at all, makes sense.


was (Author: fmeschbe):
I think we can do away with not caching the Property object. The Property object is only needed to know about whether the Property is multi-value or not. This could be done by just a flag field.

In addition you might add a JcrResourceUtil.toJavaObject method to take the multi-value flag and the array of values to convert to supercede the use of the JcrResourceUtil.toJavaObject(Property) call.

Yes, not caching the Property at all, makes sense.

> Avoid caching JCR property values
> ---------------------------------
>
>                 Key: SLING-4307
>                 URL: https://issues.apache.org/jira/browse/SLING-4307
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>            Reporter: Carsten Ziegeler
>             Fix For: JCR Resource 2.4.0
>
>
> The support for ValueMap is currently caching the JCR Value objects and also the JCR Property object.
> If the value map object is held, this might prevent garbage collection within Oak as the value object holds a reference to the revision.
> We should check whether caching is needed at all or if for example we could just cache the value itself but not the JCR Value object



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