I finally took a look at this. I noticed that, to build the table, you look at every combination of "tags". Couldn't you instead use a locality sensitive hash and break down the tags into a tree instead? In this case, you'd sweep through the data once using a LSH (I have used TLSH successfully recently) and create a tree based on parts of the hash.