【发布时间】:2014-04-09 02:01:12
【问题描述】:
以下是我的测试程序,用于测试 Titan 中去除边缘时的性能:
顶点 v1 = g.addVertex( null ); 诠释 i = 0; long lastTime = System.currentTimeMillis(); 而(真){ 顶点 v2 = g.addVertex( null ); 可迭代迭代 = v1.getEdges(Direction.IN, "last-data" ); for( 边 e : 可迭代 ) { e.删除(); } v2.addEdge(“最后一个数据”,v1); g.commit(); 如果 ( 我 % 100 == 0 ) { 持续时间长 = ( System.currentTimeMillis() - lastTime ); System.out.println("count:" + String.format("%7s", i) + ", duration:" + String.format("%7s", duration) + "ms"); lastTime = System.currentTimeMillis(); } // 万一 我++; } // 结束而随着时间的推移,移除边缘所需的时间会越来越长,即使边缘的数量始终保持为 1。
这是一个错误吗? 由于边缘的数量始终为 1,因此移除边缘所需的时间不应该保持不变吗? 是什么导致了这种行为? 无论如何解决方法?
【问题讨论】:
-
您使用的是哪个后端?卡桑德拉?
-
是的,我使用 cassandra 2.0.4 作为后端存储。是 cassandra 导致了这个问题吗?
标签: performance titan