System.err.println("Retrieved tree in " + sw);
System.err.println("traversing with DepthTreeIterator...");
sw.reset().start();
int counted = 0;
for (DepthTreeIterator it = new DepthTreeIterator("", ObjectId.NULL, tree, odb,
Strategy.CHILDREN); it.hasNext(); counted++) {
NodeRef ref = it.next();
if ((counted + 1) % (numEntries / 10) == 0) {
System.err.print("#" + (counted + 1));
} else if ((counted + 1) % (numEntries / 100) == 0) {
System.err.print('.');
}
}
sw.stop();
System.err.println("\nTraversed " + counted + " in " + sw + " ("
+ Math.round(counted / (sw.elapsed(TimeUnit.MILLISECONDS) / 1000D)) + "/s)\n");
System.err.println("traversing with DepthTreeIterator...");
sw.reset().start();
counted = 0;
for (DepthTreeIterator it = new DepthTreeIterator("", ObjectId.NULL, tree, odb,
Strategy.CHILDREN); it.hasNext(); counted++) {
NodeRef ref = it.next();
if ((counted + 1) % (numEntries / 10) == 0) {
System.err.print("#" + (counted + 1));
} else if ((counted + 1) % (numEntries / 100) == 0) {
System.err.print('.');
}