Open Normynator opened 3 years ago
I 'm wondering the same thing. So 50-60 mb data can be stored per key like in 30-40 key? which means ~2400 MB?
I write a simple benchmark for testing single key / multiple key read / writes. Read/writing with single key preforms better than multiple keys.
```dart
import 'dart:async';
import 'dart:math';
import 'integration.dart';
Future>(false);
var random = Random.secure();
print('Generating items...');
var count = 500000;
var list = List
Results:
Generating items...
Writing multiple keys took 1773ms
Writing single key took 30ms
Opening w/ multiple keys took 1810ms
Opening w/ single key took 29ms
Randomly reading multiple keys took 4ms
Randomly reading single key took 0ms
Reading multiple keys took 1196ms
Reading single key took 6ms
Equals: false
Multiple keys: 4783ms
Single key: 65ms
Question I have a question about performance. I have a list of up to 50000 items. The list is read a lot but nearly never written. My question is: Is there a performance difference if I save the list as one big list with one key and load it into memory before accessing it vs storing each item with a key and use the „get“ function? I need to access the items by key only.
TLDR: how much slower are read operations if the box has a lot of keys compared to accessing the list from memory? Is it negligible? What impacts performance of box reads in general?
Version