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

Thomas Mueller commented on OAK-3600:
-------------------------------------

Another option is to use a map instead of a cache, and update it whenever index 
definitions are added or changed.

It would be good to have a test case that (up to some point) reflects the real 
world usage, so that we can measure how much the situation improved. This also 
applies to "cache versus map" above.


> Cache property index definitions
> --------------------------------
>
>                 Key: OAK-3600
>                 URL: https://issues.apache.org/jira/browse/OAK-3600
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, query
>    Affects Versions: 1.3.9
>            Reporter: Joel Richard
>              Labels: performance
>
> At the moment, most of the time of the execution plan calculation (often 70%) 
> is spent in PropertyIndex.getCost. Therefore, it would make sense to cache 
> the property index definitions in a map<property name, plan> which avoids all 
> unnecessary traversal/repository operations.
> This cache could either be attached to the session or expire after a few 
> seconds because the problem is not that createPlan is slow itself, but is 
> just called too often.



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

Reply via email to