jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-2744) Avoid element arrays in PathImpl
Date Thu, 16 Sep 2010 11:46:32 GMT

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

Jukka Zitting updated JCR-2744:

    Attachment: TransientManyChildNodesTest-2.png

I've now gotten rid of the separate Element objects. The AbstractPath class now implements
both the Path and Element interfaces (the latter properly only when dealing with a single-element

I also improved the getElements() method to avoid the O(n^2) behaviour.

The attached plot shows the current performance improvements (about 20% on large transient
operations) that are mostly due to these changes. There's still room for additional improvements,
but I believe the biggest wins have already been achieved here.

> Avoid element arrays in PathImpl
> --------------------------------
>                 Key: JCR-2744
>                 URL: https://issues.apache.org/jira/browse/JCR-2744
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-spi, jackrabbit-spi-commons
>            Reporter: Jukka Zitting
>         Attachments: TransientManyChildNodesTest-2.png, TransientManyChildNodesTest.png
> The path handling code in spi-commons shows quite often in thread dumps and profiling
results, as the current implementation does quite a bit of repetitive allocating and copying
of path element arrays. We should be able to streamline and simplify the path handling code
by only tracking the latest path element and a reference to the parent path. To do this efficiently
we may need to adjust some of the Path and PathFactory method declarations (that currently
assume element array -based paths) also in the SPI.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message