Hi Michael,

there are several warmup things going on, which already have happened if
you execute against server.

So I recommend running the query once or twice upfront.

Also make sure to create the ExecutionEngine only once, together with the
GraphDatabaseService.

Also make sure you use a similar configuration (heap and memory mapping for
your embedded graph database).

I think you might be better off using the unmanaged extension
<http://neo4j.com/docs/stable/server-unmanaged-extensions.html> that Stefan
sent you, then you can have best of both worlds.

One example for Cypher is here in this example repo
<https://github.com/neo4j-contrib/developer-resources/blob/gh-pages/language-guides/java/server-extension>
:

https://github.com/neo4j-contrib/developer-resources/blob/gh-pages/language-guides/java/server-extension/src/main/java/example/extension/movies/MovieResource.java

Cheers, Michael

On Tue, Nov 25, 2014 at 5:21 PM, <m...@docware.de> wrote:

> Hello Michael,
>
> I have now started with Java embedded tests. I started with the Java
> example class EmbeddedNeo4j from here
> http://neo4j.com/docs/stable/tutorials-java-embedded-hello-world.html.
> I am able to execute the same Cipher queries as from the command line.
>
> What I'am astonished is that repeated queries from the command line needs
> 1,8 secs while execution from the Java program need 6-7 seconds. What the
> Java program does is
> - starting up DB
> - executing query and output result to console
> - shutting down DB
>
> For measuring time I compare System.current() millis before and after the
> execution step (excluded startup+shutdown).
>
> Do you prefer continuing this discussion here or by mail, because the
> discussion becomes off-topic?
>
> Best regards
>
> Michael
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to