diff options
author | Julio Capote <jcapote@gmail.com> | 2022-12-19 15:00:27 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2022-12-19 15:00:27 +0000 |
commit | 3c992dda076fb3e5db0f4316bdbf1cbe1d2ed274 (patch) | |
tree | daefd7b869b6c11b0056339db0d19a7a798e311d | |
parent | baf3d4cd12ac1dda157507f648ae1fb4fa95b58c (diff) | |
download | communique-3c992dda076fb3e5db0f4316bdbf1cbe1d2ed274.tar.gz |
dont prefetch key values
Diffstat (limited to '')
-rw-r--r-- | resources/outbox.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/resources/outbox.go b/resources/outbox.go index ed87dd8..4dd022b 100644 --- a/resources/outbox.go +++ b/resources/outbox.go @@ -33,7 +33,9 @@ func RenderOutboxPage(name, domain string, db *badger.DB) (map[string]interface{ itemsProp := streams.NewActivityStreamsOrderedItemsProperty() err = db.View(func(txn *badger.Txn) error { - it := txn.NewIterator(badger.DefaultIteratorOptions) + opts := badger.DefaultIteratorOptions + opts.PrefetchValues = false + it := txn.NewIterator(opts) defer it.Close() prefix := []byte("outbox:sample") // TODO for it.Seek(prefix); it.ValidForPrefix(prefix); it.Next() { @@ -86,7 +88,9 @@ func RenderOutbox(name, domain string, db *badger.DB) (map[string]interface{}, e var i int err = db.View(func(txn *badger.Txn) error { - it := txn.NewIterator(badger.DefaultIteratorOptions) + opts := badger.DefaultIteratorOptions + opts.PrefetchValues = false + it := txn.NewIterator(opts) defer it.Close() prefix := []byte("outbox:sample") // TODO for it.Seek(prefix); it.ValidForPrefix(prefix); it.Next() { |