I have a program which collect data and save it in binary file, It can build a index file IDX.txt with 5 columns ( UID,SecID,Date,Time,address), address is a pointer to data.
That program's work flow as below
/1. load index as a HoA/
/2. waitting for task/
when get a task, it will do
/A. search index HoA to find a new entry and new UID /
/B. write data and update index HoA /
/C. sort index HoA and Save it to IDX.txt file/
As time goes by, I find the IDX.txt is larger than 100M
It is very slow when I load IDX.txt and search HoA (grep, sort ). It is necessary to hold Index HoA when program is running, Is there any better way to go through this problem? I am wondering whether Cache module is a better solution, maybe any other module? thanks