Also, I realized that a the current hashtable view clears a timeout and creates a new one every write. (the idea here is to write only when things stop changing, but clearing and creating half a million timeouts actually takes some time.
Adding:
if(timer) return timer = setTimeout(function () { timer = null async.write(data) })
means that index gets built in 2 seconds instead of 7! that's a huge improvement! I also suspect this change will effect
flumeview-reduce
too.
Do you have a PR for this? Would be interesting in testing.