Disable auto-save

I want to knwo whether is there anyway to disable auto-save, i just don’t want my note be auto-saving, it cause synchronizing traffic problem to me, every single trivial action will triggle the auto-saving, thus my note keep being saved and uploading consistently. It would be better to provide an option to diable/enable auto saving or an option to set auto-saving interval.

16 Likes

Agree - there would be multiple benefits

  • wip work doesn’t get persisted if user doesn’t want it to
  • avoid disk/cloud sync churn
1 Like

I have also been struggling to work around the autosave feature, since it causes issues with both the system I use for cloud syncing and my development workflow in general (I use Obsidian for a couple code-based projects where I need to be deliberate about when I save updates to the files). Being able to at least configure the interval would be very helpful.

7 Likes

Completely new to Obsidian (0.11.5 on macOS 11.2.3); and really liking it…

May I ask the opposite question, please: How DO I (prompt a) Save - Cmnd+S as I would expect… there is no suggestion in the menus that such an option exists?

TIA!

1 Like

yes, you can change the shortcuts in the hotkey section of settings.

Got it! Thanks @WhiteNoise. Save was ⌘+S all along :slight_smile:

As I said, I’m new to Obsidian. But really, really liking it. Thanks to everyone.

I am fairly certain the overly high frequency of iCloud writes is causing Apple to pause my obsidian folder when using my windows machine. Hugely annoying because I have to reboot my machine to resolve the issue, and end up losing my recent notes.

It would be great if we had the option to lower the frequency to 1, 5, 15, 30, 60 etc second intervals.

I signed up for this forum to say I’m having the same issue. Mid sentence I’ll lose content and then have to hit Ctrl-Z. I have a Windows machine connected to iCloud.

If I could just turn off auto-save then I could hit ctrl-s whenever I needed to save. Instead it’s just syncing all the time and causes this really weird typing bug where it goes back in time as I’m typing a sentence.

1 Like

I’m bumping up on this as well. I sync to Google Drive using InSync on Linux which works great for a work-related vault (I use Obsidian Sync for personal work). However, since Obsidian saves every key type, Google Drive will only store the last 100 versions which is basically my last 100 key types.

Can we get a throttling concept built into auto-save? It really doesn’t make sense to save every key type, at least wait a second for typing activity on the file to come to a stop before saving.

2 Likes

Agreed! There are many reasons why the ability to disable the autosave feature would be wanted. Some are undeniably valid, some are personal preference.

  • A syncing system can get thrown off by constant saves (either making massive numbers of backups, or throttling due to overaccess).
  • Working on a media with limited write cycle per lifetime (flash drives, SSD, etc). This may be not worth stressing about, but knowing each type of a character triggers a resave of the entire file: the concern is reasonable.
  • Just not wanting forced into a workflow that you do not prefer. Ctrl-S has worked fine for many people for many years. There’s a reason it has stuck around.

… and, finally, a toggle in the settings to turn on/off autosaving seems like such a simple feature to add.

Such a hard line reminds me of how IOS hides file/folder structure to the point where apps like Obsidian can’t take advantage of things like syncing apps, without special programming to add custom interoperability.

1 Like

Having the same issue here.
I’m using mega.nz software for syncing between devices. After some period of time it won’t sync your files, moreover, you can’t figure out when exactly this is happening. I have’to relaunch the app to be sure all my files are synced correctly, and due to the app need’s to rescan all my files, it can take up to 10 minutes.

Autosave makes me depressed.
I set the obsidian folder as sync folder. So when I write the note, Obsidian always promoting: EBUSY:resouce busy or locked, open.

1 Like

Please, please add the option to turn off Autosave.

Using Obsidian on Windows with iCloud providing the sync produces constant conflicts which are irritating but more significantly each conflict produces a locked file which must be manually deleted. In 20 minutes of editing I have just had 7 of these files created and all have to be manually deleted. Ignoring them doesn’t work because they interfere with backups and they interfere with Obsidian indexing - I guess because they can’t be indexed.

I know I could use the ‘default app’ which, in my case would be Typora where the autosave can be switched off, but the markdown formatting doesn’t precisely match text edited directly in Obsidian so needs re-editing to get the formatting right. This re-editing is not only a waste of time but also goes back to the original problem.

2 Likes

I agree wholeheartedly that this is a sorely lacking feature, but

I now believe that Obsidian’s functionality is closely tied to the auto-save. It does a lot of different things during saving that are intended to feel seamless to the user, and at least a few of them would break badly if the loaded note were to remain out of sync with the note file’s contents. That’s my impression anyway, now that I’ve written a decently involved plugin for Obsidian.


One workaround, for people who are really struggling with the constant saving, would be to put your vault onto a RAM disk, then copy it back to the hard-disk whenever you really want to save.

I’ve done this, and it works better than you’d expect! Here’s how I did it on windows.

  1. I setup a ram disk:
    1. I installed the open-source software ImDisk Toolkit.
    2. I made the new start menu item “Mount Image File” easy to run. Then I ran it.
    3. In the window that pops up, I clicked the “Switch to Driver Interface” button at the bottom left.
    4. I set the “Size of virtual disk” to 250mb (it’s a safe bet for MY vault anyway)
    5. I set the “Device type” to “Harddisk volume”
    6. I clicked the ok button and… bam! A new hard-disk made entirely of ram.
  2. I copied the vault I wanted to work with onto the ram disk.
  3. I opened the vault from the ram disk.
  4. I setup the ability to quickly and easily save my changes using “xcopy”.
    1. I opened CMD (a command-line window).
    2. I navigated (using the CD command) to within the vault’s folder on my ram disk.
    3. I typed this command:
      • xcopy . {path to the vault folder on the real hard-disk} /s /d /e /f /y
    4. I tested it by running it again (just hit the up arrow key, then enter), noting that no files were copied. I then changing one note in the vault and ran it again, confirming that the single note was copied.

FYI, that long xcopy command includes flags to ensure that the only files that are copied are the ones that are newer on the ram-disk than on the real hard-disk.

Also, if you are handy, you can create a batch script to run that xcopy command, rather than needing to remember it.

Hope that helps. If you are on Linux or Mac, the steps are similar, but you’d use different software and command.

This is correct.

What are the consequences of using the “default app” with auto-save switched off and doing a manual save every minute or so?

I can’t say for certain what the consequences are for not auto-saving, because I’m just basing my supposition on some things I’ve noticed while making my plugin, such as how much data Obsidian is caching behind the scenes, much of which is re-calculated when files are saved.

I know that many plugins, both core and community, use that cached data. Tags, links and YAML-front-matter all rely on it. It is interesting to note that the popular plugin “DataView” keeps its own cached data, but re-calculates it when navigating away from a note instead of when saving. This makes it kind of quirky in that you need to move to a different note, then back again before certain changes will take effect.

Now, as to why all that caching needs to be done at save, rather than just be triggered whenever a note is changed? I can’t be sure. I have a couple of theories, though:

  1. It’s possible that some of the data is cached to disk, thus requiring that either (a) the notes are saved too, or (b) the cache on disk is allowed to be in-sync with the notes in memory, while being out-of-sync with the notes on disk. If (b) is true, then if Obsidian crashes and loses unsaved data, the data cache on the disk becomes out-of-sync in an indeterminate way. This issue could be fixed by recaching all data each time the vault is opened, but it’s possible that this would take a long time, especially for bigger vaults (which would explain why the cache would be written to disk in the first place). Another fix could be to recognize when a crash happens and only re-calculate the entire cache after a crash. This might be a viable solution, to this particular theory. In fact, I think some software does do it this way.
  2. It’s possible that data for each note is pulled in and out of memory as needed. I do know that extra-long notes are internally segmented into smaller parts. It’s likely that this segmenting is done to load and unloaded parts of the note from memory as the user moves around the note. In fact, if you think about it, the ability to quickly navigate from note to note, regardless of how big the vault is, would necessitate keeping only visible notes in memory. Removing auto-save would require explicitly asking the user if they want to save when you navigate away from a changed note (like document editing software does), but Obsidian isn’t document editing software, it’s note-taking and mind-mapping software, which relies on the ability to quickly and effortlessly move from note to note.

Now that I’ve written it up, theory 2 seems probable to me. However, I could see a few ways around it:

  • Auto-saving a note whenever an unsaved segment of the note is moved out of memory, rather than as soon as it is changed. This solution could get hairy for the user, since it requires saving the note (a very important action to the user, thus this entire thread) whenever segments of the note are moved in and out of memory (something the user has no concept of, nor should). Thus, this solution would cause notes to be saved at perceptually random points.
  • Saving unsaved segments of the note to backup files, until the user explicitly saves. Some software works this way, such as Notepad++. Thus if a segment has a backup file (i.e. it has not been user-saved) then load from the backup file, instead of from the note file directly. This would, in fact, resolve both theories 1 and 2 above. However…
    • It’s a complicated system, and may not be implemented simply for that reason.
    • The backup files could pile up if a user never bothers to save their notes. This is especially true of a large vault. Again, Obsidian is a note-taking and mind-mapping software. The concept of requiring explicit user-saving runs antithetical to that purpose.
    • One of Obsidian’s strengths is that it’s primarily a simple folder-tree, with a hidden “.obsidian” folder to handle the extra stuff. Having notes being out-of-date unless you take into account a bunch of backup files in the “.obsidian” folder runs counter to that concept.
    • Whether save-spamming happens to the notes or to backup files makes no difference to syncing software, meaning it wouldn’t resolve what seems to be the primary issue people have with auto-saving. Of course, you could tell the syncing software to ignore any changes within the folder where backup files are stored. Any decent syncing solution should let you do this. Yeah, this particular issue could be worked around.

So I guess the gist of this is: it’s a lot more complicated than it seems on the surface. There might be a viable solution, but it’s not obvious (at least to me). One question Obsidian devs might ask: is it worth the effort? People who struggle with jamming syncing systems would argue that, yes, it is worth it! Obsidian devs might be convinced if this was a strong enough concern to counterbalance what is obviously a sticky problem to solve. I’m guessing that it’s not.

I think that the ram-disk idea that I proposed above (and have been actively using) is a workable solution. It might seem like a big deal to implement, but it really isn’t that bad. I admit to having had moments of concern that I hadn’t “saved” my data recently (from the ram disk to the hard disk). One solution would be to have a script that auto-saves (auto-calls xcopy) on a regular basis. THAT seems like more work than it’s worth to me, but it’s all relative. Someone else could see that being perfectly reasonable.

I just found a better solution than using xcopy to sync the ram-disk with the hard-disk.
FreeFileSync is software to sync two folders, either manually, or at regular intervals. This includes a “mirror” mode, which is what we want in this situation.

Obsidian is very flexible but not in this regard?
All those things done during saving should not care wether the saving is triggered automatically or manually.

Not having the option is sad… I was looking through all the options and then looked online to find this thread.

Back to Ghostwriter for me it is then :frowning: