Mobile, startup: Reduce the time until the user can write

Third-party syncing solutions work since they only need access to the folder where Obsidian files are, they are completely independent from the Obsidian app itself. The Automate workflow I mentioned was an idea for a workaround to keep the Obsidian app open in the background (which third-party syncing apps don’t need to do).

Hi, at first I was looking for myself in Droid, to have an app be persistent in memory. I have found url:

Yet on a board it was likely to be not working unfortunately:
https://groups.google.com/g/android-platform/c/YfUaru4yrSg?pli=1

I am not an Android developer, perhaps some dev would know more about this.

Hopefully someday someone comes up with a solution, will following this thread.

On Android (on Samsung at least) you can lock an app open which prevents it from ever being closed:

  1. Go to the Recents page (swipe up and hold if using gesture navigation, or tap the III button if you’re using navigation buttons).
  2. Tap the app icon above the app preview/card.
  3. Tap Lock this app / Keep open.

If you do this, opening or switching to Obsidian is always instant.

2 Likes

Thanks, unfortunately it only prevents closing the app from the task switcher list when you press the close all button or swipe it away.
See: Reddit - Dive into anything
I have One UI 5.1 from Samsung on a A51 phone. I only tested the swipe away move, I didn’t want to close my current list because of remembering what todo.
It still worked even with the Good lock and Home up app from Samsung: I changed the Switcher to mini mode, to have a better one hand operation. Small trick to mention (I didn’t knew this until this year): double tapping the recent apps icon in the nav bar will switch between apps instantly.

Regarding the issue:
It will not keep it in memory either, I have set the developer options open in Settings. When I look at the Active services > tapping ellipsis > Show cached processes, you will find the cached processes (I have 2: around 140 MB, 40 MB) if you have Obsidian open.
When I open multiple somewhat heavy apps, browsers, messengers, it will push the Obsidian processes from the list, while I have the lock on.
When I tapped the Obsidian icon in the Switcher list, it had to start up, loading plugins, loading cache, loading vault, loading workspace etc.

GJ.

I can absolutely 100% confirm that is NOT the case.

Without doing this, Obsidian takes about 15 seconds to start up almost every time.

After doing this, Obsidian is instant, forever, until I restart my phone.

I have One UI 5.1 on an S22 Ultra. I have also whitelisted Obsidian from memory management and battery optimisation, but those steps do nothing without also locking it open.

1 Like

We really need a solution to this. The “lock app” workaround is great but only available on Samsung phones. I have a Google Pixel 6 Pro, on which I have tried the “unrestricted battery usage” setting for the app, which seems to prevent Obsidian from needing to be relaunched as often, but it’s still tens of times per day.

Bottom line, Obsidian is incredibly slow to start for large vaults on Android. If the vault is empty, the Obsidian startup time is blazingly fast, not even measurable with a stopwatch. But in my large vault, the app takes 4.8 seconds to start up which is unusably slow. This vault has 1406 files, total size is 705 MB consisting of 450MB worth of media files, a handful of ~30MB PDFs, and the rest are all small markdown files.

I tried disabling all core plugins except for Random Note and Bookmarks, this only shaved a couple hundred milliseconds off the startup time. Even with all Community Plugins disabled, I could never get the startup time on my Pixel to get below 4 seconds for this vault.

I would gladly trade some functionality off for startup performance. On my Mac & PC, I don’t care how long Obsidian takes to start because I leave it open all the time anyways. But on mobile, it needs to be very quick because I want to use it dozens of times per day to take quick notes, which I can’t do if it takes this long to start up.

I’m toying with the idea of writing a minimalist Obsidian clone Android app (with no support for plugins) if this doesn’t get addressed by the devs.

4 Likes

an obsidian clone… interesting idea. thanks for that. I checked the Play store and there is one: https://play.google.com/store/apps/details?id=org.eu.thedoc.zettelnotes

I tested it for 15 minutes, looks good. after being kicked from memory it loads my obsidian vault instantly. in obsidian takes a couple of seconds.

markdown compatability looks perfect on first look.

Well, Obsidian takes some time to start up, that’s normal.
The issue is when Obsidian needs to restart all times.
Surprisingly, optimization for battery leads to opposite results on my Android 11. Also allowing background activity seems not to guarantee Obsidian to stay open, so i guess that:

  • some community plugins could cause restart
  • sharing from other apps causes Obsidian to restart sometimes
  • Obsidian on phone needs an update

A good solution to implement would be to just start a minimal markdown viewer and editor first, especially when Obsidian is started from a link to a specific note. Do everything else needed for startup in the background, while the user can already work.

I have that as a workaround now, by having notes which I need often open in the app Zettel Notes. it starts instantly and I think it does this because it only starts a minimal viewer and editor. when I need full blown Obsidian I can always start it up and edit the same notes there.

3 Likes

100% agree. Launching is so slow that I don’t even bother using it for notes on the go. I’m forced to use Google Keep, which is a real hassle as I then have to move notes from app to app. And if the vault I had open previously is not the one I need for the current note? Double that wait.

I hate this because Obsidian is so amazing. I want to use it all the time for everything.

@redhorse, thanks for the tip! I’ll give Zettle Notes a try.

2 Likes

Well, you guys could download (on Android only) an app called Automate and install a community flow called quick capture for Obsidian
That flow should be under 30 blocks long, so you don’t have to buy for pro. Anyways, its a priceless application (not just some “app”) and it costs ridiculously little

Mobile quick capture is on the Roadmap as planned, maybe that will help in many of the mentioned cases in this thread.

4 Likes

That’s nice, but but meanwhile we need other solutions.

Edit
Since version 1.4.9, Obsidian restarts very often, just as little as a minute or less after I switch to other apps and come back to Obsidian, pretty annoying :pensive:

I played with the toggle “allow background data” (or how it’s called in english ) and saw how this causes Obsidian to restart immediately on my Android 11 phone.

Obsidian shouldn’t require a live internet
connection and background data if publish or sync is off and plug-ins update isn’t in action.

Maybe some plugins require background data on a regular basis, but if so, plugin authors should be encouraged to declare this requirements in their readme or documentation.

I saw, how Obsidian connects to:

ajax.googleapis.com
avatars.githubusercontent.com
android.googleapis.com

I don’t know why Obsidian needs to connect to online service at all, as I don’t use sync or publish and don’t update my plugins every n-minutes.

On my Pixel 7, it takes 39 seconds just to get to the progress spinner, then another 49 to load completely. I have 7000 markdown files and 28000 PDFs in my full vault, but only a subset are synced (by SyncThing or, on my previous phones, dropsync like @redhorse ) to my phone and tablet (Samsung Tab S7 FE, whose times are 86 and 78 respectively). Obsidian can still be useful for me on mobile even with this crippling, but, like @cwhiii , I end up using Keep or, more recently, Markor for quick capture. (If only Markor had a daily note analog…)

If the startup time can’t be improved drastically in the foreseeable future (it’s a problem on desktop too, though I think it has been getting better over the last year), maybe Obsidian devs just need to accept Google’s intended best practice, which I imagine is some sort of caching in an activity onPause callback, as part of the activity lifecycle. Various tricks to slip past battery/memory management have historically always eventually been defeated by Google.

I also want to note that the things Obsidian seems to think will be slow are not at all a problem. As @MostlyArmless noted, extensions only add a few hundred milliseconds. And when the formerly-dreaded “rescanning notes … this should only happen once” notification pops up, it doesn’t actually get in the way of usage. I imagine that a major problem on big file trees is listing all the potential link targets, whether the app can then inotify-watch them (on desktop), or has to do some sort of polling (inotify limits on Android are stupidly low; most of my SyncThing folders are unfortunately on a periodic-rescan basis).

A possible workaround could be to disable wikilinks (grey them out or something) in that first few seconds to minutes, and pop up a “please wait” warning or spinner only in the case that a user actually taps a link in that initial period. This way we can still use the app in ways that don’t require searching for link referents, such as go-to-daily-note, or using standard relative or even absolute markdown links (both of which build their path deterministically).

That’s unusually slow. Is the vault stored in the on device memory?

How many files are present it total and what is the startup time with restricted mode on?

I created a cool workaround that I’m really happy with. I used Tasker to create 3 shortcuts on my homescreen:

  • The first opens a text dialog where you can enter a quick note which then gets appended to a specified note in your vault using a timestamped markdown header.
  • The second opens a Google Speech to Text interface where you can speak a note. When you stop speaking, the transcribed text is appended to that same file.
  • The third is a shortcut to open the quicknote in Obsidian itself for viewing or editing. This one requires that you have the Obsidian Advanced URI plugin installed.

Setup instructions

Here are the setup steps for anyone who wants to replicate this on their Android phone:

  1. On your phone, install the Obsidian Advanced URI community plugin.
  2. Choose or create a new note in your vault which you want to use as the quicknote. All quicknotes that you write/speak will be appended to this file and you can manually organize the content later.
  3. Once you’ve chosen a quicknote file, run the “Obsidian Advanced URI: Copy URI for current file” command to get the URI on your clipboard. It’s important that you do this before importing the Tasker project.
  4. From your phone, open this link which is the “Obsidian Quick Text and Voice notes” project I made.
  5. Tap the green “Import” button to add it to Tasker.
  6. Follow the on-screen prompts to specify the filepath to your desired quicknote file and then paste the Advanced URI from step 3 when prompted.
  7. Long press your homescreen, add a Tasker “Task Shortcut” widget. When prompted, choose one of the 3 tasks included with this project (“Capture Text Quicknote”, “Capture Voice Quicknote” or “Open Quicknote in Obsidian”). Repeat this step for the other 2 tasks.

Usage instructions

Just tap one of the icons on your homescreen to take a quick text or voice note, or to open the quicknote file in Obsidian.

Hope this helps everyone while we’re waiting on app improvements.

3 Likes

Sorry the “this link” in my above post doesn’t seem to work. Here it is again:

https://taskernet.com/shares/?user=AS35m8mtsFaD5soDFkzkOhVV7I4nA1oVRm4gynMNJG1D%2FT0GE%2FHGB6F68Ag7S9iZ4Qbtxjq7Hg%3D%3D&id=Project%3AObsidian+Quick+Text+and+Voice+notes

I have a very similar setup for logging my entering/exiting of specific places (helps me when I review my day). But I create a note per day, keeps the files in a more manageable size. Any reason why you decided to use a single note?

I have since changed my setup. Added another Tasker task to auto-create my daily note at midnight each day and update the variables so all the Quicknotes go into my daily note. It’s working much better than having a single note.

I use the Markor Android app and its QuickNote for quick entry without having to open Obsidian or when due to low RAM it has dropped out of memory & relaunching the app+plugins+workspaces is not needed & would take too long. I also like using Markor & VS Code to check that my notes are usable outside of Obsidian.

My Markor settings make it access my Obsidian vault files location:

LEFT.Obsidian_RIGHT.Markor.PNG | Markor settings.PNG

I use the following settings for all my Obsidian vaults …

Under Files and Links:

  1. “Default location for new notes” - “Same folder as current file”.
  2. “New Link Format” - “Relative path to file”.
  3. “Use [[Wikilinks]]” - “off” … yet I still get the advantages of [[]]
  4. Detect all file extensions - enabled
  5. “Default location for new attachments” - “In subfolder under current folder”.
  6. “Subfolder name” - value: “attachments”.
2 Likes