mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Use unordered maps to store inset and math rows geometry.
Simply using unordered_map instead of map makes a big difference for documents with lots of math insets in one text inset. Related to bug #12297.
This commit is contained in:
parent
3ad94ec6d9
commit
e09158efee
@ -228,7 +228,7 @@ struct BufferView::Private
|
||||
///
|
||||
CoordCache coord_cache_;
|
||||
///
|
||||
typedef map<MathData const *, MathRow> MathRows;
|
||||
typedef unordered_map<MathData const *, MathRow> MathRows;
|
||||
MathRows math_rows_;
|
||||
|
||||
/// this is used to handle XSelection events in the right manner.
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "Dimension.h"
|
||||
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace lyx {
|
||||
|
||||
@ -153,7 +153,7 @@ private:
|
||||
lyxbreaker(thing, hint, data_.size());
|
||||
}
|
||||
|
||||
typedef std::map<T const *, Geometry> cache_type;
|
||||
typedef std::unordered_map<T const *, Geometry> cache_type;
|
||||
cache_type data_;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user