Perfomance leak

3 views
Skip to first unread message

Parshin Dmitry

unread,
Jun 7, 2008, 5:52:12 AM6/7/08
to imgseek_dev
Hi,

i think imgdb module has a performance leak in case of search in big
dbase

sigs base and image buckets are linked by string id, which in this
code force a performance leak:

// update the score of every image which has this coef
long_listIterator end = imgbuckets[c][pn][idx].end();
for (long_listIterator uit = imgbuckets[c][pn][idx].begin();
uit != end;
uit++) {
sigs[(*uit)]->score -= weights[sketch][imgBin[idx]][c]; ///
leak is here

in each iteration search in tree (std::map) is performed.

i think the better way to link by pointers.
Reply all
Reply to author
Forward
0 new messages