mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for bug#12695572 - "IMPROVE MDL PERFORMANCE IN PRE-VISTA
BY CACHING OR REDUCING CREATEEVENT CALLS". 5.5 versions of MySQL server performed worse than 5.1 versions under single-connection workload in autocommit mode on Windows XP. Part of this slowdown can be attributed to overhead associated with constant creation/destruction of MDL_lock objects in the MDL subsystem. The problem is that creation/destruction of these objects causes creation and destruction of associated synchronization primitives, which are expensive on Windows XP. This patch tries to alleviate this problem by introducing a cache of unused MDL_object_lock objects. Instead of destroying such objects we put them into the cache and then reuse with a new key when creation of a new object is requested. To limit the size of this cache, a new --metadata-locks-cache-size start-up parameter was introduced.
This commit is contained in:
@ -128,6 +128,15 @@ public:
|
||||
}
|
||||
inline T* front() { return m_first; }
|
||||
inline const T *front() const { return m_first; }
|
||||
inline T* pop_front()
|
||||
{
|
||||
T *result= front();
|
||||
|
||||
if (result)
|
||||
remove(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
void swap(I_P_List<T, B, C> &rhs)
|
||||
{
|
||||
swap_variables(T *, m_first, rhs.m_first);
|
||||
|
Reference in New Issue
Block a user