do not create a new ObjectMapper per entry

also read value with MappingIterator.
This made reading 20-30 times faster. 
We can now read and index 100k-500k per second.
The varianz might be due to LuDB slowness.
This commit is contained in:
2016-12-12 18:45:02 +01:00
parent 89fbaf2d06
commit 876520eb4c
3 changed files with 23 additions and 16 deletions

View File

@@ -91,7 +91,7 @@ public class PerformanceDb implements AutoCloseable {
writer.write(entry);
count++;
if (count == 10000) {
if (count == 100000) {
final long end = System.nanoTime();
final double duration = (end - start) / 1_000_000.0;
LOGGER.info("inserting the last " + count + " took " + duration + " ms; " + durationInManager

View File

@@ -65,6 +65,7 @@ public class TagsToFile implements AutoCloseable, CollectionUtils {
}
} catch (final NullPointerException e) {
// TODO @ahr ludb should handle unknown fields better
e.printStackTrace();
}
Collections.sort(result, PdbFileByTimeAsc.INSTANCE);