jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Deparvu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-8249) NodeImpl#isNodeType could load mixin info lazily
Date Tue, 16 Apr 2019 14:14:00 GMT

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

Alex Deparvu commented on OAK-8249:
-----------------------------------

This is a wip evaluation branch [0].

preliminary benchmark results look good (almost 4x faster), but the test is obviously biased
because it only does primary type lookup. still good to get a feel for some raw numbers:

{noformat}
(trunk)
# IsNodeTypeTest                   C     min     10%     50%     90%     max       N 
Oak-Segment-Tar                    1      85      87      92      98     130     644

(patch)
# IsNodeTypeTest                   C     min     10%     50%     90%     max       N 
Oak-Segment-Tar                    1      21      22      23      24      32    2590
{noformat}

Unfortunately there is an Interator<> passed around so I had to wrap into a custom lazy
loading iterator (not sure if something like this exists already, it is generic enough to
go into some sort of commons code if needed).
Problem 2: dealing with the RepositoryException from the lazy loader is a pain, the current
solution is very hacky.

[~mreutegg] what do you think?


[0] https://github.com/apache/jackrabbit-oak/compare/trunk...stillalex:OAK-8249

> NodeImpl#isNodeType could load mixin info lazily
> ------------------------------------------------
>
>                 Key: OAK-8249
>                 URL: https://issues.apache.org/jira/browse/OAK-8249
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: jcr
>            Reporter: Alex Deparvu
>            Assignee: Alex Deparvu
>            Priority: Minor
>
> The current isNodeType check loads both primary type and all mixins eagerly.
> I'm wondering how often is the case where someone only needs a primary type check, and
if loading the mixins lazily would improve the throughput.



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

Mime
View raw message