diff options
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() { |