There has been some discussion in the past about how it would be helpful to control how often autosave runs, especially for users on platforms like TiddlyHost, where frequent autosaves can slow things down or interrupt editing.
I’ve been working on a new prospective implementation for the core and would welcome your feedback and testing.
I’ve packaged the changes into a temporary plugin so it’s easy to install in your own wiki and test. The settings UI and description that you will see are temporary to aid testing.
What’s New?
Instead of saving automatically after every change, this update gives you more control over when autosave happens. It introduces two optional behaviors you can enable via config tiddlers:
$:/config/AutoSave/DelayAfterEdit
Wait until you’re done editing.
When this is set to yes
, autosave won’t happen immediately after a change. Instead, it will wait until you pause editing/making changes that trigger autosave again.
That pause time is controlled by:
$:/config/AutoSave/DelayAfterEditInterval
Sets the number of milliseconds TiddlyWiki should wait after your last change before autosaving.
Example:
Set it to10000
to autosave 10 seconds after you stop editing.
This prevents autosave from interrupting you while you’re actively working.
$:/config/AutoSave/MaxDelay
Never go too long without saving.
Even if you keep editing nonstop, this setting ensures that autosave will still happen at least once within a certain time limit, like every 5 minutes.
If DelayAfterEdit
is disabled, autosave will occur only once within that time limit. This would allow you to set your wiki to autosave only once every 5 minutes.
This time limit is set using:
$:/config/AutoSave/MaxDelayInterval
Sets how many milliseconds is the maximum time allowed before autosave must run.
Example:
Set it to300000
to ensure a save happens at least once every 5 minutes.
What I Need Feedback On:
- Is the mechanism too complex to easily understand?
- If so, please consider this older and simpler proposal to limit AutoSave to once every
n
minutes wheren
can be configured. You can test that here.
- If so, please consider this older and simpler proposal to limit AutoSave to once every
- Is this implementation helpful in your wiki? Especially if you use TiddlyHost or other platforms where autosave may slow things down.
- Are the setting names clear and easy to understand? Please feel free to suggest more intuitive alternatives.
- Should different defaults be used?
- Would a visual indicator be helpful to show when autosave is pending? If so, what kind of indicator would you want to see?
Background:
-
An earlier implementation was simpler and simply delayed autosaving more than once in a given interval. However, the feedback I had from a few users was that while this was very helpful, autosave was still happening a little too frequently for their liking during times of heavy wiki editing such as creating and saving many tiddlers.
- I have my doubts as to whether the greater control the new implementation offers is worth the additional complexity it entails.
- These changes do not have any impact on what triggers an autosave in TiddlyWiki and what does not.