Optimizing Re-indexing in Obsidian for Bulk .md File Imports

Hello everyone,

I’m facing a challenge with file indexing in Obsidian and hoping someone might have suggestions on how to optimize or bypass some of the re-indexing behaviors.

Background
I frequently export markdown (.md) files from external software into my Obsidian vault. These exports can sometimes contain over 9,000 individual .md files. While the initial indexing and syncing across my devices are understandably time-consuming, it’s manageable for a one-time import.

However, here’s where things get tricky: if I modify just one of those 9,000 files and re-import it into the vault, Obsidian seems to re-index all 9,000 files instead of just the modified ones. This drastically increases sync times, especially on my mobile devices.

I know the logical question might be, “Why not just import the changed file?” In reality, though, it’s rarely just a single file. Typically, there are around 100-200 changed files spread across different subfolders, making it cumbersome to locate each one manually.

Question
Is there a way to configure Obsidian to re-index only the new or modified files rather than all of them? What should I consider when exporting—perhaps the creation time? Is there some metadata that needs to match the original .md files so that Obsidian doesn’t re-index all 8,900 unmodified notes again? And does the TypeScript API reference on mtime have anything to do with this?

Thanks in advance for any insights or solutions!

You need to configure your program/script doing the exporting in such a way that if there are no changes, do not overwrite/modify time stamp. Otherwise Obsidian will pick it up for reindexing and there are no custom user settings to bypass it.

1 Like

To further expand on what @Yurcee is saying, I would introduce a third folder to the mix, so that you have:

  • the original folder where you export from
  • the vault of Obsidian folder
  • and an intermediate folder (which is recreated with every export)

Now you could use some free file synchronisation tool to compare the last two folders, and do a one way sync from the intermediate folder to your vault. This will have the effect of only updating changed files, which are the files truly needing to be reindexed.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.