Dedup vs SimplePath

174 views
Skip to first unread message

Sebastian

unread,
Nov 5, 2015, 3:31:05 PM11/5/15
to Gremlin-users
Hi,

I'm trying to account for potential cyclical paths encountered while generating a subgraph. I saw two methods that give me similar results, but I'm curious as to the performance impacts of each. What is the difference between Dedup-ing at every step of my traversal, versus doing the same with SimplePath? 

I understand SimplePath is generally very expensive because it has to maintain the traversal information, but I couldn't find any info as to how Dedup works under the hood. Any thoughts?

Daniel Kuppitz

unread,
Nov 5, 2015, 5:05:23 PM11/5/15
to gremli...@googlegroups.com
Hi Sebastian,

dedup() ensures that no vertex is touched twice, globally. simplePath() ensures that no vertex is touched twice on the current path, hence it has to keep the full path history and is pretty expensive.

Cheers,
Daniel


--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/05dadb71-4f5c-4ea7-9e0c-de27f3d6dff5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages