we define map key as
while data is another complex structure, which is about 300k per record.Code:struct bufKey { int stime; int etime; short angle; short datatype; string code; string name; }
we use simple code to scan database when program startup as
We use BDB as database.The scan become very slow (several minutes) when the size of database grow more than 1GB. I add Freeze.Trace.Map config file and found that "duplicating iterator/close iterator" uses most of the time.Code:Basedb::const_iterator it; for(it=baseDatabase.begin();it!=baseDatabase.end();it++) { printf("time %d\n",it->first.stime); }
Can I speed up the scan ?

Reply With Quote
