flumelog-aligned-offset
I started this a while back, but recently got it working properly! It's a new flumelog
format, that is a little different from flumelog-offset
. Like flumelog-offset
there data is read as blocks, but what is different, is that records never overlap blocks. At the end of each block, there is an empty space, but it means you can always read any record from a single block, and don't need to copy memory when reading an overlapping block. Also, it's implement on top of dat's random-access-storage
which means it works in the browser!
It's also much faster than flumelog-offset
.
offset:
name, ops/second, mb/second, ops, total-mb, seconds
append, 142319.536, 18.007, 711740, 90.055, 5.001
stream, 288621.248, 36.518, 711740, 90.055, 2.466
stream no cache, 361106.037, 45.69, 711740, 90.055, 1.971
stream10, 312574.815, 39.549, 1568813, 198.498, 5.019
random, 63731.96, 8.063, 318851, 40.343, 5.003
aligned-offset:
name, ops/second, mb/second, ops, total-mb, seconds
append, 471424.83, 59.623, 2358067, 298.236, 5.002
stream, 1137503.617, 143.867, 2358045, 298.236, 2.073
stream no cache, 915392.08, 115.772, 2358050, 298.228, 2.576
stream10, 1201254.247, 151.928, 6009875, 760.098, 5.003
random, 355715.056, 5078.074, 1778931, 25395.448, 5.001
append, stream, stream no cache, stream10
are all 3x faster. and random
is over 500 times faster (not sure why, yet)