Hi Peter,
Thank you for giving a try looking at it.
This is the test code:
static void TestNeo4j(int MaxDegreeOfParallelism)
{
Teva.Common.Data.Neo4j Client = new
Common.Data.Neo4j("127.0.0.1", "7474");
System.Diagnostics.Stopwatch Stopwatch = new
System.Diagnostics.Stopwatch();
Stopwatch.Start();
var RootNode =
(Neo4jRestNet.Core.Node)Client.GetScalar("x=g.addVertex(['Root':'Root']);x;");
object RootID = RootNode.Id;
Console.WriteLine("Root: " + RootID + " (" +
Stopwatch.ElapsedMilliseconds + "ms)");
Stopwatch.Restart();
int NodesCount = 100;
int ReadsCount = 100;
Parallel.For(0, NodesCount, new ParallelOptions {
MaxDegreeOfParallelism = MaxDegreeOfParallelism }, i =>
{
var Properties = new Neo4jRestNet.Core.Properties();
Properties.SetProperty("Name", "Name_" + i);
Properties.SetProperty("Value", "Value_" + i);
Client.Execute("x=g.addVertex(['Name':", new
GremlinParameter("Name_" + i), ",'Value':", new GremlinParameter("Value_" +
i), "]);g.addEdge(g.v(", new GremlinParameter(RootID), "), x,
'Instance');");
});
Console.WriteLine("Created " + NodesCount + " nodes (" +
Stopwatch.ElapsedMilliseconds + "ms)");
Stopwatch.Restart();
#region Read / Count
Parallel.For(0, ReadsCount, new ParallelOptions {
MaxDegreeOfParallelism = MaxDegreeOfParallelism }, i =>
{
var Count = Client.GetScalar("g.v(", new
GremlinParameter(RootID), ").out('Instance').count()");
});
#endregion
Console.WriteLine("Counted " + ReadsCount + " x " + NodesCount
+ " nodes (" + Stopwatch.ElapsedMilliseconds + "ms)");
Stopwatch.Restart();
#region Read / Instances
Parallel.For(0, ReadsCount, new ParallelOptions {
MaxDegreeOfParallelism = MaxDegreeOfParallelism }, i =>
{
var Result = Client.GetArray("g.v(", new
GremlinParameter(RootID),
").out('Instance').transform{['ID':it.id,'SchemaID':it._().in('Instance').id.next()]}");
foreach (Dictionary<string, object> Item in Result)
{
object ID = Item["ID"];
object SchemaID = Item["SchemaID"];
}
});
Console.WriteLine("Read " + ReadsCount + " x " + NodesCount + "
nodes (" + Stopwatch.ElapsedMilliseconds + "ms)");
Stopwatch.Restart();
#endregion
}
Effy
On Friday, March 28, 2014 12:32:17 PM UTC+3, Peter Neubauer wrote:
>
> Effy,
> as Neo4j 2.0.1 is not in any official Tinkerpop version yet, we haven't
> spent a hug amount on performance testing the plugin. However, do you have
> that test somewhere so I can have a look?
>
> /peter
>
>
> G: neubauer.peter
> S: peter.neubauer
> P: +46 704 106975
> L: http://www.linkedin.com/in/neubauer
> T: @peterneubauer <http://twitter.com/peterneubauer>
>
> Open Data - @mapillary <http://mapillary.com>
> Open Source - @neo4j <http://neo4j.org>
> Open Future - @coderdojo <http://malmo.coderdojo.se>
>
>
> On Fri, Mar 28, 2014 at 12:22 AM, Effy Teva <[email protected]<javascript:>
> > wrote:
>
>> Are there no Neo4j Gremlin REST users?
>> It's hard for me to believe this issue isn't important.
>>
>> Anyone from the Neo4j Team could care to comment?
>>
>> Thanks
>> Effy
>>
>>
>> On Monday, March 24, 2014 4:18:12 PM UTC+2, Effy Teva wrote:
>>>
>>> Hi,
>>>
>>> I've made some tests today, and found out Neo4j 2.0.1 Gremlin Plugin
>>> works much slower than the one included with Neo4j 1.9 (~60 times slowed).
>>> My test results are available here: https://groups.google.com/
>>> forum/#!topic/gremlin-users/_PZT5HMKUyA
>>>
>>> Is there any special reason for that? Might be a configuration issue?
>>> I've built Gremlin Plugin from the instructions on
>>> https://github.com/neo4j-contrib/gremlin-plugin
>>>
>>> Thanks for your help,
>>> Effy
>>>
>> --
>> 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 [email protected] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.