Slow app load time on Android. Clearing workspace-mobile.json fixes it. Obsidian is trying to load multiple tabs which aren't open?

What I’m trying to do

Open Obsidian on Android and have it open in a reasonable time, say < 1 sec.

Instead it takes 5-11 seconds. My vault is about 4,000 files and 1,000 images in 800 MB total. I do have one “dump” note folder with 1,800 notes which need to be sorted. I removed this, just to test, and it did not change loading time at all.

I notice that the Obsidian startup timer shows multiple tabs open - up to 40 or 50 sometimes. I don’t understand this, as the mobile app view does not show tabs. Tabs don’t seem to be a feature of the mobile app at all, so why are they piling up in a background I can’t access?

I discovered that clearing the workspace-mobile.json file brings my app open time down to about 1 second, which is great. It opens to a blank screen, which I don’t mind at all.

However, Obsidian quickly starts piling notes up in the workspace, and app time bloats up again.

I discovered there’s a “tab view” in the command screen - so I closed all tabs. However, Obsidian does not respect this and still shows 9 tabs in the background, it seems.

So let’s start. Here’s my load time with zero community plugins:

Obsidian version: 1.13.8 (367)
API version: 1.13.8
Operating system: Android 17 (Google Pixel 9)
Webview version: 153.0.0.0

    Total startup time: 4,262ms
    Initialization: 489ms
        Boot: 363ms
            Response: 12ms
            DOM parse: 65ms
            Script evaluation: 285ms
        Language: 27ms
        App setup: 99ms
    Vault (3,632 files): 2,394ms
        Configuration: 53ms
        Reading files: 2,312ms
        Loading file metadata: 26ms
        Metadata listeners: 4ms
    Workspace (10 tabs, 9 deferred): 293ms
        Components: 27ms
            Managers: 11ms
            Settings: 16ms
        Appearance: 6ms
        Managers: 70ms
            Metadata types: 18ms
            Secret storage: 25ms
            Hotkeys & commands: 27ms
        Layout: 186ms
            Load layout: 184ms
            Finalize: 2ms
        Extra: 3ms
    Core plugins: 279ms
    Community plugins (0 active): 807ms

Here is my load time after clearing the workspace-mobile.json file. It dropped to a shocking 2 seconds!

Obsidian start-up time breakdown

Obsidian version: 1.13.8 (367)
API version: 1.13.8
Operating system: Android 17 (Google Pixel 9)
Webview version: 153.0.0.0

    Total startup time: 2,441ms
    Initialization: 538ms
        Boot: 408ms
            Response: 9ms
            DOM parse: 105ms
            Script evaluation: 293ms
        Language: 30ms
        App setup: 100ms
    Vault (3,632 files): 1,026ms
        Configuration: 53ms
        Reading files: 932ms
        Loading file metadata: 30ms
        Metadata listeners: 11ms
    Workspace (9 tabs, 1 deferred): 160ms
        Components: 28ms
            Managers: 11ms
            Settings: 17ms
        Appearance: 6ms
        Managers: 67ms
            Metadata types: 16ms
            Secret storage: 27ms
            Hotkeys & commands: 24ms
        Layout: 55ms
            Load layout: 54ms
        Extra: 4ms
    Core plugins: 304ms
    Community plugins (0 active): 414ms

Things I have tried

This is the command I ran to clear the workspace-mobile.json:

cat > .obsidian/workspace-mobile.json << 'EOF'
{
  "main": {
    "id": "0f93609c5bb37662",
    "type": "split",
    "children": [
      {
        "id": "21ac148177293b4b",
        "type": "tabs",
        "children": [
          {
            "id": "21da50514c0e999a",
            "type": "leaf",
            "state": {
              "type": "markdown",
              "state": {
                "file": null
              }
            }
          }
        ]
      }
    ]
  },
  "left": {
    "id": "b54efb143561a528",
    "type": "mobile-drawer",
    "children": []
  },
  "right": {
    "id": "2f1e3affe7077f2a",
    "type": "mobile-drawer",
    "children": []
  },
  "active": "21da50514c0e999a"
}
EOF

Then I re-enabled my plugins, including Sync Engine. I am not sure if Sync Engine pulls workspace state from my desktop, but I believe the Sync Engine docs say that all dot files (.obsidian, etc) are ignored.

Obsidian soon slows down again.

Here is my latest time:

Obsidian start-up time breakdown

Obsidian version: 1.13.8 (367)
API version: 1.13.8
Operating system: Android 17 (Google Pixel 9)
Webview version: 153.0.0.0

    Total startup time: 6,254ms
    Initialization: 493ms
        Boot: 369ms
            Response: 11ms
            DOM parse: 78ms
            Script evaluation: 280ms
        Language: 26ms
        App setup: 98ms
    Vault (1,812 files): 3,190ms
        Configuration: 54ms
        Reading files: 3,112ms
        Loading file metadata: 23ms
        Metadata listeners: 2ms
    Workspace (9 tabs, 8 deferred): 1,273ms
        Components: 27ms
            Managers: 10ms
            Settings: 18ms
        Appearance: 7ms
        Managers: 69ms
            Metadata types: 18ms
            Secret storage: 26ms
            Hotkeys & commands: 25ms
        Layout: 1,165ms
            Load layout: 1,162ms
            Finalize: 3ms
        Extra: 5ms
    Core plugins: 320ms
    Community plugins (3 active): 978ms
        Sync Engine (3.1.6): 227ms
        Templater (2.25.0): 142ms
        Front Matter Timestamps (1.5.5): 17ms
        Other: 592ms

Tabs are a feature of the mobile app.
Just like the desktop app, there are the tabs for the notes (you can see a list by tapping the fifth icon in the navigation bar) and the sidebar tabs (generally, populated by plugin views).

Also note that obsidian doesn’t load all the tabs at startup, most are deferred to be loaded on first use.

I went through this a second time, more carefully, and I think I’ve determined it’s the Sync Engine plugin causing the slowdown.

Sync Engine is a fantastic plugin so I opened an issue report here: [Bug]: 9 second Obsidian Android app startup time with Sync Engine enabled · Issue #276 · hesprs/sync-engine · GitHub

I turned off all plugins and wiped workspace-mobile.json and achieved a 2 sec startup again. Then I turned them on one by one. No plugin increased the startup time until I fired up Sync Engine again.

I swear I did this before, but I must have been moving too quickly.

Obsidian start-up time breakdown

2.6 sec without Sync Engine:

Obsidian version: 1.13.8 (367)
API version: 1.13.8
Operating system: Android 17 (Google Pixel 9)
Webview version: 153.0.0.0

- Total startup time: 2,688ms
- Initialization: 477ms
  - Boot: 342ms
    - Response: 10ms
    - DOM parse: 78ms
    - Script evaluation: 254ms
  - Language: 35ms
  - App setup: 100ms
- Vault (3,632 files): 1,082ms
  - Configuration: 51ms
  - Reading files: 1,002ms
  - Loading file metadata: 26ms
  - Metadata listeners: 3ms
- Workspace (9 tabs, 9 deferred): 129ms
  - Components: 28ms
    - Managers: 11ms
    - Settings: 17ms
  - Appearance: 6ms
  - Managers: 70ms
    - Metadata types: 19ms
    - Secret storage: 28ms
    - Hotkeys & commands: 23ms
  - Layout: 22ms
    - Load layout: 22ms
  - Extra: 3ms
- Core plugins: 332ms
- Community plugins (3 active): 668ms
  - Templater (2.25.0): 169ms
  - Book Search (0.7.5): 67ms
  - Front Matter Timestamps (1.5.5): 47ms
  - Other: 386ms

Then I turned on Sync Engine. I let it scan all files and perform a sync so everything was stable. Then I swiped obsidian out of memory and started it up again.

Nearly 9 seconds with Sync Engine. Note that Sync Engine itself is only listed as 249ms, but the whole app took 8.9sec with it enabled. Reading files took quite some time - I wonder if Sync Engine forces a re-read of the vault with every app open.

Obsidian version: 1.13.8 (367)
API version: 1.13.8
Operating system: Android 17 (Google Pixel 9)
Webview version: 153.0.0.0

- Total startup time: 8,965ms
- Initialization: 517ms
  - Boot: 375ms
    - Response: 16ms
    - DOM parse: 72ms
    - Script evaluation: 287ms
  - Language: 37ms
  - App setup: 105ms
- Vault (3,633 files): 5,505ms
  - Configuration: 46ms
  - Reading files: 5,425ms
  - Loading file metadata: 30ms
  - Metadata listeners: 4ms
- Workspace (9 tabs, 8 deferred): 1,618ms
  - Components: 28ms
    - Managers: 11ms
    - Settings: 17ms
  - Appearance: 6ms
  - Managers: 68ms
    - Metadata types: 18ms
    - Secret storage: 43ms
    - Hotkeys & commands: 7ms
  - Layout: 1,512ms
    - Load layout: 1,509ms
    - Finalize: 2ms
  - Extra: 4ms
- Core plugins: 354ms
- Community plugins (4 active): 971ms
  - Sync Engine (3.1.6): 249ms
  - Templater (2.25.0): 160ms
  - Book Search (0.7.5): 48ms
  - Front Matter Timestamps (1.5.5): 24ms
  - Other: 490ms

Welp, you’re right. Thanks. There’s a tab button at the bottom bar. Never looked at that for whatever reason!