I used annoy to build an index for 2 million vectors of size 1024. Here is the code that I used.
f = 1024
t = AnnoyIndex(f, 'euclidean')
t.on_disk_build('test.ann')
'''code for adding 2 million vectors'''
t.build(25)
After adding vectors, t.build(25) runs forever. ( I let it to run about six hours and it doesn't finish) However, the code works fine with 1 million vectors.