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

pieter martin commented on TINKERPOP-1349:
------------------------------------------

Hi,

I just ran the following test,

{code}
    @Test
    public void testRepeat() throws IOException {
        Graph graph = TinkerGraph.open();
        GraphTraversalSource g = graph.traversal();
        graph.io(GraphMLIo.build()).readGraph("../data/grateful-dead.xml");
        long timeStart = System.currentTimeMillis();
        
System.out.println(graph.traversal().V().out().out().out().count().next());
        long timeEnd = System.currentTimeMillis();
        System.out.println(timeEnd - timeStart);
        timeStart = System.currentTimeMillis();
        
System.out.println(graph.traversal().V().out().barrier().out().barrier().out().barrier().count().next());
        timeEnd = System.currentTimeMillis();
        System.out.println(timeEnd - timeStart);
    } 
{code}

the output is
{code}
14465066
1074
14465066
26
{code}

So adding the barrier steps has a huge impact on performance.
You mention the "the benefit of bulking is leveraged"
Can you point me to why and where in the code this benefit is?

Thanks

> RepeatUnrollStrategy should unroll loops while maintaining equivalent 
> semantics.
> --------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1349
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1349
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.0-incubating
>            Reporter: Marko A. Rodriguez
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.2.0-incubating
>
>
> Create {{RepeatUnrollStrategy}} that will unroll patterns such as:
> {code}
> repeat(out()).times(3)
> // ->
> out().barrier().out().barrier().out().barrier()
> {code}



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

Reply via email to