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

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

Thank you for sharing!

That is exactly my setup. Glad to see it makes sense not only for me :smile:

Well, quick capture is one thing (which can be easily done in Tasker, as mentioned).
The bigger problem is reading notes.
I would like to easily check my todo list from Obsidian. Or check some other things on the go, like grocery list or sth. Right now it’s horrible with the issue that you always need to wait for the app to open.
I considered moving to some other markdown app, for now the fact that I’m extensively using Obsidian Tasks plugin prevents me from that, as the todo lists are generated by it from many files, it’s not a clear markdown.
What could be a nice workaround (but it’s still not possible!) is having possibility to add widgets to show a content of a given note. That would be awesome.

Anyway, this whole issue makes the android app almost unusable in my opinion…

1 Like

The Android Markor app I mentioned above has a widget
… that is a folder viewer that lets you choose the initial folder to select a note to open in the Markor app.
… and has a little thunder icon that opens the QuickNote.
OR
Install Android Markdown Widget
via APK or from F-Droid
… after installation right-click somewhere the usual way to activate the widget.
… you can view the note and are given the choice of …
open in default markdown editor, e.g. Markor (works fine)
open in obsidian (currently broken)
never open

3 Likes

Workaround:
use Obsidian for the inner directory which contains frequently used notes only. so, I can use plugins with quick start-up.
and If I need other notes that are not used frequently, instead of changing the vault to the root directory, I use Zettle note for searching the note.
for the time being, It’s a trade-off for the slow start-up.

Suggestion:

  1. provide option to start Foreground service which is not terminated by android system. so, that there is no need to start up continuously. it can be introduced very easily. but, this may increase the battery consumption or memory usage.

  2. the slow start-up is because of caching the notes. To cache the notes only when plugins or some functions request the cache will be helpful. and on start-up, instead of mandatory caching, cache notes in the background only. but, mostly, we use plugins that need a cache like the tasks plugin. then, it will be nice if Obsidian provides the database function for each plugin to save their cache on their database. so that, minimize the access to cache. then the start-up time can be faster with the complete function of each plugin. but, this needs lots of changes I think

For the Pixel 7, it’s the internal storage, yes (no SD card slot). For the Samsung, it’s on an SD card (and includes a larger subset of the full vault on my Desktop). The vaults are synced between devices using SyncThing. All devices have their own .obsidian.HOSTNAME folder, so they’re not fighting for plugin/settings changes, and of course I don’t mess with the caching mechanisms, which are out-of-tree and not synced.

On the full-fat desktop version of the vault, find . -type f | wc reports 591642 files.

I infer a count of 30082 files on the phone in particular using

(system) tsbertalan@tian:~/Dropbox/Projects$ cat count_on_phone.sh
IFS='
'
for f in `cat tocheck`; do cd "$HOME/Dropbox/Projects/$f"; find . -type f | wc | awkfield 1; done; cd ~/Dropbox/Projects/
(system) tsbertalan@tian:~/Dropbox/Projects$ bash count_on_phone.sh  | awk '{sum+=$1;} END{print sum;}'
30082

In restricted mode, I time the phone startup as:

  • 49 seconds to get to the “Loading vault…” spinner
  • “Loading plugins” for a second or so
  • “Loading workspace…” at 1:05
  • Ready to use at 1:47

With restricted mode then turned off again and the app restarted (swiped away from recents and then reopened, that is), I see

  • “Loading your vault data” until 1:24
  • “Loading plugins” for a second or so
  • “Loading workspace” at maybe 1:26
  • Ready to use at 2:28.

(I’m doing these timings on the phone, because Samsung’s ability to lock an app to its recents carousel, whatever they call that, seems to make re-launches much less frequent on the tablet.)

I don’t know if these timing differences with and without plugins enabled are significant or just noise of some kind. But even the base case is a little painful, if much more usable than they were at launch of the Android app.

@MostlyArmless and @ichmoimeyo , yeah, I’m also just using Markor’s quick-note widget option for capture instead of obsidian. And I semi-frequently edit notes in Typora or Sublime on desktop if a second-opinion or low-level control of markdown is important. The google STT tasker integration does sound appealing.

Sine launch time is generally under 2 minutes, I’m now in the habit of pre-launching obsidian when I think that, in the next 5, I might be doing some reading/browsing/link-following tasks that Markor can’t really handle well. It’s usable (much better than at launch, as I said!), but awkward.

I know getting a different phone isn’t the ideal solution, but it does work. Get a samsung phone so you can use the keep open feature. I previously tried the pixel 8 and it was terrible. It didn’t just close obsidian in the background, but other apps very aggressively. I recently got the s24+ and obsidian stays open in the background so is always ready to use.

1 Like