avoid searching std::map twice in innochecksum

This commit is contained in:
Eugene Kosov 2021-06-25 18:00:47 +03:00
parent 1918bdf32c
commit 7da1cfb07a

View file

@ -912,12 +912,7 @@ parse_page(
}
/* update per-index statistics */
{
if (index_ids.count(id) == 0) {
index_ids[id] = per_index_stats();
}
std::map<unsigned long long, per_index_stats>::iterator it;
it = index_ids.find(id);
per_index_stats &index = (it->second);
per_index_stats &index = index_ids[id];
if (page_is_free(xdes, page_size, page_no)) {
index.free_pages++;
return;