Fix perf issue clearing many empty FLASH databases

This commit is contained in:
John Sully 2022-11-24 00:41:14 +00:00
parent 5047e64dee
commit fb0c8e475f

View File

@ -43,6 +43,8 @@ void StorageCache::clear(void(callback)(void*))
void StorageCache::clearAsync()
{
std::unique_lock<fastlock> ul(m_lock);
if (count() == 0)
return;
if (m_pdict != nullptr) {
dict *dSav = m_pdict;
m_pdict = dictCreate(&dbStorageCacheType, nullptr);