Skip to content

Commit 9b19074

Browse files
author
Krzysztof Borowy
committed
docs: android limits
1 parent e700985 commit 9b19074

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

website/docs/Limits.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
id: limits
3+
title: Known storage limits
4+
sidebar_label: Known limits
5+
---
6+
7+
## Android
8+
9+
AsyncStorage for Android uses SQLite for storage backend. While it has [its own size limits](https://www.sqlite.org/limits.html), Android system also have two known limits: total storage size and per-entry size limit.
10+
11+
12+
- Total storage size is capped at 6 MB by default. You can increase this size by [specifying a new size using feature flag.](advanced/IncreaseDbSize.md)
13+
14+
- Per-entry is limited by a size of a WindowCursor, a buffer used to read data from SQLite. [Currently it's size is around 2 MB](https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/res/res/values/config.xml;l=2103).
15+
This means that the single item read at one time cannot be larger than 2 MB. There's no supported workaround from AsyncStorage.
16+
We suggest keeping your data lower than that, by chopping it down into many entries, instead of one massive entry.
17+
This is where [`multiGet`](API.md#multiget) and [`multiSet`](API.md#multiset) APIs can shine.

website/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
docs: {
3-
'Getting started': ['install', 'usage', 'link', 'api'],
3+
'Getting started': ['install', 'usage', 'link', 'api', 'limits'],
44
Advanced: ['advanced/next', 'advanced/jest', 'advanced/brownfield', 'advanced/backup', 'advanced/executor', 'advanced/db_size'],
55
Debugging: ['debugging/communityPackages'],
66
Help: ['help/troubleshooting'],

0 commit comments

Comments
 (0)