in reply to save hash to file?

A major defect of this idea is that, all data are virtually loaded in memory all the time. Unless the amount of searchable index is limited, I do not consider this as a workable solution.

Use a DB in this case, and leave the momery management to the DB.

Peter (Guo) Pei