// without this optimization, the first entries will be fast but then the adding new
// entries will slow down due to the fact that hibernate needs to adjust the size of
// the session cache permanently. flushing or transactions won't help since the problem
// is in the session cache.
if (i%2 == 0) {
db.closeSession();
db = DBFactory.getInstance();
}
}
long endCreate = System.currentTimeMillis();
Tracing.logDebug("created " + numbRes + " repo entries in " + (endCreate - startCreate) + "ms", RepositoryManagerTest.class);