-
Notifications
You must be signed in to change notification settings - Fork 1
Storage
#How K-9 Mail uses your device storage
K-9 Mail doesn't use your device storage uniformly. This page will explain some internals of the actual usage of your precious megabytes.
K-9 Mail core application file is installed in the device internal storage. As of 3.400, K-9 Mail uses 3.0MB of internal storage (core application code, not counting data).
Since Android 2.2, the system is able to install core application files on the external storage (usually a microSD card). Unfortunately, doing so makes the application unable to work when the external storage is shared, like when your device is USB-plugged. Furthermore, Android does not restart the application when the application is brought back (on USB unplug).
Quoting the Android documentation:
Warning: When the user enables USB mass storage to share files with a computer or unmounts the SD card via the system settings, the external storage is unmounted from the device and all applications running on the external storage are immediately killed.
More information about Froyo "App2SD" limitations: http://d.android.com/guide/appendix/install-location.html#ShouldNot
Those are non account-specific settings. They are stored in the Android native internal storage.
They take very little space (less than 0.2MB).
Accounts storage is divided in 2 parts:
- settings
- actual mails
Internal storage.
This is where the actual mails are stored.
- Before 3.400, mail databases were always stored in the regular database location (the device internal storage).
- Since 3.400, mail databases can be moved to the external storage (
Account settings
>Storage
).
Be aware that switching storage location is likely to exhibit performance variations (see Performance issues below).
Storing an account on the external storage makes K-9 Mail unable to fetch mails for that account when your device is USB-mounted.
Feature | Destructive | Mails on server | Account settings | Account mail database | Description |
---|---|---|---|---|---|
Compact | No | Untouched | Untouched | Updated | Reclaim free space |
Clear messages | TODO | Untouched | TODO | TODO | TODO |
Recreate data | Yes | Untouched | Untouched | Removed | Mail database will be recreated, you may(?) need to refresh folders |
K-9 Mail may temporarily need some additional space. This can be safely cleared from the Android "Manage applications" screen.
Case studies:
- HTC Desire, Class 6 MicroSD (1.8GB of 7.1GB free), !CyanogenMod 6.1 (Android 2.2.1), Wi-Fi 72Mpbs, K-9 Mail 3.400 fetching 250 IMAP messages:
- internal storage: 1min 30sec
- external storage: 16min 15sec
We try hard to make external storage safe to use (using DB transactions, waiting for DB operations to finish before letting Android know we're ready to be USB-mounted), but please be aware that Android is able to kill K-9 Mail (as any other app) anytime. It can happen that Android kill K-9 on USB-mount. It occurred during development but it never resulted in a corrupted database.
In the eventuality of a unreadable/corrupted database, K-9 will automatically remove the underlying file in order to recreate a fresh new one.