Improve Obsidian Startup Time on Older Devices with the FastStart Script

Why improve the startup time of Obsidian?

Did I succeed?

How Obsidian starts up

  • Obsidian initializes its internal memory cache, a database of information about files in your vault.
  • It loads the user interface the visual elements of the program (buttons, panes, workspaces, and so on).
  • Obsidian starts loading the plugins one by one if you have enabled plugins.

My approach to faster startup: FastStart script

  1. Let Obsidian start, with just a few crucial plugins enabled.
  2. Obsidian loads fast because only a few plugins are enabled, and I can begin working with my files.
  3. While I am already working on files, after a brief timed delay, load the remainder of my plugins in the background while I am working.

How is this accomplished

  1. It can run JavaScript code, which is needed for this hack.
  2. It can run a script file when Obsidian starts.

Setup

  • Benchmarking: record the startup time of Obsidian on your devices before implementing this hack.
  • Disabling most plugins (except Templater).
  • Create two files for Templater and paste in some JavaScript code.
  • Create a file with a list of plugin ID's that start after 2 seconds.
  • Create a second file with a list of plugin ID's that start after 30 seconds.
  • Experiment by moving plugins ID between the two lists.

Templater Plugin and the Templater Folder Location

Templater Settings in Obsidian

FastStart-StartupScript file

FastScript Javascript code

FastStart-GenerateListOfInstalledPlugins

FastStart-Plugins-ShortDelay and FastStart-Plugins-LongDelay

  • FastStart-Plugins-ShortDelay
  • FastStart-Plugins-LongDelay

Assign a Startup Template

We are ready to go

Baseline Benchmark

  1. Record how long it takes Obsidian to load with all your plugins enabled without any changes to your current configuration.
  2. It is also good to put your device into "Safe mode" in the Community Plugins settings screen and restart Obsidian. Record how long it takes while in safe mode. This baseline number is valuable because it shows you how long Obsidian takes with no plugins enabled, and frankly, we can't change how much time Obsidian itself needs. So this baseline is the "minimum" startup time before any optimizations can be added.

Configuring FastStart

  1. What plugins should load with Obsidian
  2. What plugins should start 2 seconds after Obsidian is loaded and you can already work with the program
  3. What plugins should load 30 seconds after the previous phase.

Step 1: Enable/Disable plugins that start with Obsidian

Step 2: Define what plugins should start a few seconds after Obsidian starts

Step 3: Define what plugins should start a little while later

Measure the results

Trial and Error

Tweaking the timing

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store