Commit 014e1258 authored by Eugene Kosov's avatar Eugene Kosov

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.
parent 3304004a
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment