ministat opened a new pull request, #1873:
URL: https://github.com/apache/tinkerpop/pull/1873
Janusgraph's JanusGraphVertexDeserializer uses the following code to create
a TinkerVerex, which leads to a lot of NuSuchElementException and hurts the
performance.
FastNoSuchElementException can fix the performance issue.
public TinkerVertex getOrCreateVertex(final long vertexId, final String
label, final TinkerGraph tg) {
TinkerVertex v;
try {
v = (TinkerVertex)tg.vertices(vertexId).next();
} catch (NoSuchElementException e) {
if (null != label) {
v = (TinkerVertex) tg.addVertex(T.label, label, T.id,
vertexId);
} else {
v = (TinkerVertex) tg.addVertex(T.id, vertexId);
}
}
return v;
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]