2 Replies Latest reply: May 24, 2012 12:58 AM by Neil Zou RSS

Performance issue with file system connector

Neil Zou Newbie

Hi all,

 

I'm using modeshape 2.8.1.Final, and I'm trying to upload 5000 xml files to a empty file system repository. The processing time for each file increases from 0.4 seconds to 4.5 seconds.

 

Below is my configuration:

 

<?xml version="1.0" encoding="UTF-8"?>

<configuration xmlns:mode="http://www.modeshape.org/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">

 

    <mode:sources jcr:primaryType="nt:unstructured">

 

        <mode:source jcr:name="pocFS" mode:classname="org.modeshape.connector.filesystem.FileSystemSource"

            mode:workspaceRootPath="/dev/poc/workspaces"

            mode:defaultWorkspaceName="poc"

            mode:creatingWorkspacesAllowed="false"

            mode:updatesAllowed="true">

 

            <mode:cachePolicy jcr:name="nodeCachePolicy"

                mode:classname="org.modeshape.graph.connector.base.cache.InMemoryNodeCache$PathCachePolicy"

                mode:timeToLive="300" />

 

        </mode:source>

    </mode:sources>

 

    <mode:mimeTypeDetectors>

        <mode:mimeTypeDetector jcr:name="Detector">

            <mode:description>Standard extension-based MIME type detector</mode:description>

            <mode:classname>org.modeshape.graph.mimetype.ExtensionBasedMimeTypeDetector</mode:classname>

        </mode:mimeTypeDetector>

    </mode:mimeTypeDetectors>

 

    <mode:repositories>

 

        <mode:repository jcr:name="pocFileRepo">

            <mode:source>pocFS</mode:source>

            <mode:options jcr:primaryType="mode:options">

                <jaasLoginConfigName jcr:primaryType="mode:option" mode:value="modeshape-jcr"/>

                <queryIndexDirectory jcr:primaryType="mode:option" mode:value="/dev/poc/workspaceindex" />

            </mode:options>

            <mode:nodeTypes jcr:primaryType="mode:nodeTypes"/>

            <namespaces jcr:primaryType="mode:namespaces" />

        </mode:repository>

 

    </mode:repositories>

</configuration>

 

 

Files in workspacetime taken for each file
00.4
10001.1
20001.9
41003.6
48004.4

 

I found the bottleneck is in below two methods, each taken around 2 seconds.

PathTransaction.getChildren(..)

RequestProcessor.process( ReadBranchRequest request)

 

Could anyone give me a hint to improve performance in this case?

 

Thanks