[
https://issues.apache.org/jira/browse/TINKERPOP3-609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14490261#comment-14490261
]
Marko A. Rodriguez commented on TINKERPOP3-609:
-----------------------------------------------
This is a bit of a ramble, but bear with it.
I think {{io()}} may be too general. It is nice you can write "just an edge",
"just a property", ... but I don't think that should be available in
{{io()}}.... only available to {{VertexSerializer}}-stuff in Gryo. I think for
users its just one thing!!!!
* Adjacency list.
Thus:
* {{writeVertex(Vertex,Direction)}}
* {{default writeVertices(Iterator<Vertex>, Direction)}}
* {{writeGraph(Graph)}} where this is just a shorthand for
{{writeVertices(graph.vertices(),Direction.OUT)}}
Thats it. For all of them, its just {{StarGraph}} serialization. Gryo is cool
with it. GraphSON is cool with it. The only one that is not is GraphML.
However, for GraphML we could do a "two pass" get all the vertices, then go and
get all the edges of those vertices.
Thoughts?
Finally, I think we still need the Gryo.writeEdge(), Gryo.writeVertex(),
Gryo.writeVertexProperty(), etc. as those are important for "single object"
serialization and {{DetachedXXX}} should be used there. I would just "hide it"
somehow. or maybe not........ dunno. you know what I'm trying to get at?
> Reduce the memory footprint of Gryo
> -----------------------------------
>
> Key: TINKERPOP3-609
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-609
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: io
> Reporter: Marko A. Rodriguez
> Assignee: stephen mallette
> Priority: Critical
> Fix For: 3.0.0.GA
>
>
> A 1 million vertex graph with 1 edge each is a 150meg file. That is 150 bytes
> per vertex/edge.
> If the vertex id is a long that is 4 bytes.
> If the edge id is a long that is 4 bytes.
> The edge should only have ONE id for the otherV of 4 bytes.
> The edge label should be somehow "enum'd" and 1 byte.
> The vertex label should be somehow "enum'd" and 1 byte.
> Add 2-3 bytes for terminators.
> Thus, we should be able to get away with a 17 byte representation (assuming
> no variable width encodings) and thus, a 17 meg file. That is a near 10x file
> size reduction.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)