tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [22/50] [abbrv] tinkerpop git commit: TINKERPOP-1676 Improve GraphSON serialization performance on VertexProperties CTR
Date Mon, 19 Jun 2017 11:00:43 GMT
TINKERPOP-1676 Improve GraphSON serialization performance on VertexProperties CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4907af42
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4907af42
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4907af42

Branch: refs/heads/TINKERPOP-1489
Commit: 4907af42f9689650ed30f3a511044e0b418cee3e
Parents: 5c32e7d
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Sat Jun 17 05:54:48 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Sat Jun 17 05:54:48 2017 -0400

----------------------------------------------------------------------
 .../structure/io/graphson/GraphSONSerializersV2d0.java      | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4907af42/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
index 8d19e4f..1a5cd7d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
@@ -580,7 +580,6 @@ class GraphSONSerializersV2d0 {
         public VertexProperty deserialize(final JsonParser jsonParser, final DeserializationContext
deserializationContext) throws IOException, JsonProcessingException {
             final DetachedVertexProperty.Builder vp = DetachedVertexProperty.build();
 
-            Map<String, Object> properties;
             while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                 if (jsonParser.getCurrentName().equals(GraphSONTokens.ID)) {
                     jsonParser.nextToken();
@@ -593,8 +592,12 @@ class GraphSONSerializersV2d0 {
                     vp.setValue(deserializationContext.readValue(jsonParser, Object.class));
                 } else if (jsonParser.getCurrentName().equals(GraphSONTokens.PROPERTIES))
{
                     jsonParser.nextToken();
-                    properties = deserializationContext.readValue(jsonParser, propertiesType);
-                    properties.entrySet().iterator().forEachRemaining(kv -> vp.addProperty(new
DetachedProperty(kv.getKey(), kv.getValue())));
+                    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
+                        final String key = jsonParser.getCurrentName();
+                        jsonParser.nextToken();
+                        final Object val = deserializationContext.readValue(jsonParser, Object.class);
+                        vp.addProperty(new DetachedProperty(key, val));
+                    }
                 }
             }
 


Mime
View raw message