mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 07:11:02 +00:00
increased the default cache size
This commit is contained in:
parent
35fb817a68
commit
6a46cfe95a
2 changed files with 3 additions and 3 deletions
|
|
@ -345,7 +345,7 @@ func NewFragment(frag_id util.SUUID, db string, slice int, frame string) *Fragme
|
|||
f := new(Fragment)
|
||||
f.requestChan = make(chan Command, 64)
|
||||
f.fragment_id = frag_id
|
||||
f.cache = lru.New(20000)
|
||||
f.cache = lru.New(50000)
|
||||
f.impl = impl //NewGeneral(db, slice, NewMemoryStorage())
|
||||
f.slice = slice
|
||||
f.exit = make(chan *sync.WaitGroup)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ func NewGeneral(db string, frame string, slice int, s Storage) *General {
|
|||
|
||||
}
|
||||
func (self *General) Clear() bool {
|
||||
self.bitmap_cache = lru.New(10000)
|
||||
self.bitmap_cache = lru.New(50000)
|
||||
self.bitmap_cache.OnEvicted = self.OnEvicted
|
||||
return true
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ func (self *General) Exists(bitmap_id uint64) bool {
|
|||
}
|
||||
func (self *General) Get(bitmap_id uint64) IBitmap {
|
||||
bm, ok := self.bitmap_cache.Get(bitmap_id)
|
||||
if ok {
|
||||
if ok && bm != nil {
|
||||
return bm.(*Bitmap)
|
||||
}
|
||||
bm, _ = self.storage.Fetch(bitmap_id, self.db, self.frame, self.slice)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue