Start off storage cache with a larger size
Former-commit-id: 5f6fb970a81cc73586ba595b35564e7865e7262d
This commit is contained in:
parent
11a8ab1865
commit
1610f4211f
@ -32,7 +32,7 @@ public:
|
||||
StorageCache *cache = new StorageCache(nullptr);
|
||||
if (pfactory->FSlow())
|
||||
{
|
||||
cache->m_setkeys = std::make_unique<semiorderedset<sdsimmutablestring, sdsview, true>>();
|
||||
cache->m_setkeys = std::make_unique<semiorderedset<sdsimmutablestring, sdsview, true>>(20);
|
||||
}
|
||||
load_iter_data data = {cache, fn, privdata};
|
||||
cache->m_spstorage = std::shared_ptr<IStorage>(pfactory->create(db, key_load_itr, (void*)&data));
|
||||
|
@ -49,8 +49,11 @@ class semiorderedset
|
||||
}
|
||||
|
||||
public:
|
||||
semiorderedset()
|
||||
semiorderedset(size_t bitsStart = 0)
|
||||
{
|
||||
if (bitsStart < bits_min)
|
||||
bitsStart = bits_min;
|
||||
bits = bitsStart;
|
||||
m_data.resize((1ULL << bits));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user