Prolonged Startup Times with High Object Counts in Anytype

What’s The Bug?

If Anytype stores a high number of objects and has been closed for a few hours, the startup time increases significantly. Testing on two devices—one with a few hundred notes and another with over 15,000—showed average startup times of about 2 seconds and 12 seconds, respectively.

I suspect the object count is the primary cause. Anytype organizes data into objects (e.g., notes) and resources (e.g., images, videos). Resources are unlikely to be the issue. If resources preloaded during startup, images in notes would load immediately. However, opening a note with images often results in delays, with some images failing to load initially. This suggests object count is the only plausible cause of the long startup times.

In-memory caching does not resolve the issue. While caching can speed up reopening apps after quick successive launches, the problem lies in the prolonged startup time after Anytype has been idle for a while. In-memory caching does not address this scenario.

This significantly affects usability for users with a large number of notes

Related Issues

Similar Issue was mentioned here.

How To Reproduce It

  1. Add 15000 notes
  2. Close Anytype
  3. Wait a few hours
  4. Open Anytype

The Expected Behavior

Anytype opens up in a few Seconds maximum, even if the app is closed for a while.

Device

Galaxy A34 5G

OS

Android 14

Anytype Version

Version 0.34.26

Network Mode

P2P, Anytype Storage Limit reached

Technical Information

Device: SM-A346B samsung
Android version: 34
App version: 0.34.26
Build number: 3426
Library version: 0.38.9
Account ID: AAJJojhHyjRpABQ9cqu4ANcVFCuu91ejVWGwHZNVdPNiVatq
Device ID: 12D3KooWM7HZzPHsD2b6NBxWNfqDFYs1oRWq9WJxVTgU2yqU9WCR
Analytics ID: 4cc876fe-7bc8-4d60-b256-9bea5153e19c

This report has been added to our issue tracker and received by the Development Team.

Hey @werererer!
Looks like you have a corrupted local db on your device. This can happen in case of unexpected power loss (e.g. battery problems). But usually it should be solved on the next start and should not happen again. In your case I see reports that recovery is happening many times.

  • Make sure you have some free storage on your Android device. It may be a reason.
  • If this doesn’t help you can remove the app and reinstall it so your account will be fetched from the network. But I see that you have specified that you exceeded your storage limit. So make sure all the files are synced to another device via P2P.

In the latest release, there are many fixes related to the application startup time, please update.