RavenDB Indexing Optimizations, Step III - Skipping the Disk Altogether
Join the DZone community and get the full member experience.Join For Free
coming back a bit, before prefetching, we actually had something
with the new prefetching, we can parallelize the indexing & the i/o fetching. that is good, but the obvious optimization is actually not going to the disk at all. we already have the documents we want in memory, why no send them directly to the pre fetched queue?
as you can see, we didn’t need to even touch the disk to get this working properly. this gives us a really big boost in terms of how fast we can index things. also note that because we already have those docs in memory, we can still merge separate writes into a single indexing batch, reducing the cost of indexing even further.
Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.