]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os: IndexManager:: optimaze map<coll_t, CollectionIndex* > col_indices 3132/head
authorNing Yao <zay11022@gmail.com>
Wed, 10 Dec 2014 05:21:29 +0000 (05:21 +0000)
committerNing Yao <zay11022@gmail.com>
Wed, 10 Dec 2014 05:21:29 +0000 (05:21 +0000)
commit17d63904455f2d62ba56ea9286aa9a6d8e0edcb9
treeaaaf20d960e156cb5227caabe4dee2b265dd9dc6
parentbc2b9f6bf5fa629e127852720d6ad42ef1276b12
os: IndexManager:: optimaze map<coll_t, CollectionIndex* > col_indices
col_indices is just used to cache CollectionIndex, and use col_indices.find() to get its corresponding index. Without any using of up_bound() and low_bound(), we can use unordered_map to make it fast. Based on perf, when I chanage map to unordered_map, the cpu cost for get_index(coll_t c, const string& baseDir, Index *index) is much lower.

Signed-off-by: Ning Yao <zay11022@gmail.com>
src/os/IndexManager.cc
src/os/IndexManager.h