diff options
author | Eugene Kosov <claprix@yandex.ru> | 2019-12-12 00:38:28 +0700 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2019-12-12 22:19:41 +0700 |
commit | 014e1258309da2475b8ae36d445261f87422adaf (patch) | |
tree | 28072408e5b3c4c5aac76b9c723d4bfe379374db | |
parent | 3304004a576c5a19f21664eda88d00c91c793f03 (diff) | |
download | mariadb-git-014e1258309da2475b8ae36d445261f87422adaf.tar.gz |
optimize crash recovery
recv_dblwr_t::list is used for appending to the beginning and iterating
through its elements. std::deque fits better for that purpose because
it does less allocations than std::forward_list and provides better memory
locality.
-rw-r--r-- | storage/innobase/include/log0recv.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index 5a687b5df08..85a4388b8a7 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -33,7 +33,7 @@ Created 9/20/1997 Heikki Tuuri #include "log0log.h" #include "mtr0types.h" -#include <forward_list> +#include <deque> /** Is recv_writer_thread active? */ extern bool recv_writer_thread_active; @@ -173,7 +173,7 @@ struct recv_dblwr_t { @retval NULL if no page was found */ const byte* find_page(ulint space_id, ulint page_no); - typedef std::forward_list<byte*, ut_allocator<byte*> > list; + typedef std::deque<byte*, ut_allocator<byte*> > list; /** Recovered doublewrite buffer page frames */ list pages; |