Bottleneck (_get_max_id_) in ngrams insertiong identified and removed.