Unsaved modified tiddlers can be lost with new chrome performance feature

Since version 110 chrome has activated automatic unloading of background webpages to reclaim memory. If such a page is a tiddlywiki with unsaved work then this work will be lost. This can be disabled globally from:

settings->performance

This would apply to all pages. The individual listing of URLs to be ignore did not seem to work.

I have (just) quickly put together a browser extension that automatically tells chrome not to unload any tiddlywikis. This is obviously not rigorously tested, but you can try at your own risk:

5 Likes

Thanks for sharing this heads up, @buggyj this is an important issue to address,

  • lets see if we can focus in on when this may occur.
  • I am confident this error state will not occur in Chrome and other Progressive web Apps (PWA)'s, if it were a fix will be quick, so perhaps this needs a core tweak? unless its a temporary bug.

I was using version 110.0.5481.104 (Official Build) (64-bit) which only just updated to Version 110.0.5481.178 (Official Build) (64-bit) but I had not experienced the problems you report. In fact to the contrary, as I close down I have to ensure a few of my wikis are saved before I can shutdown at the end of the day (expected behaviour).

  • Chrome on Windows 11
  • Using Timimi for single file wikis
  • Editing online read-only wikis using export or saving if needed
  • Using bob.exe for node wikis
  • 16GB machine with Chrome permitted to use more memory

I can’t see Settings > Performance in my chrome, have you introduced this through some settings, developer tools, platform specific or a canary release or something?

Could you expand on that? Why are you confident that this error state will not occur on Chrome? What do you mean by ā€œother PWAsā€ (Chrome isn’t a PWA and neither is TiddlyWiki).

1 Like

Websites, PWA’s (used in the browser), tiddlywiki, all depend on browser reacting to the dirty state to avoid loss of information (discard) on shut down.

  • I suggest, Not occur in the long run, because we would imagine it will effect other sites used through chrome. Resulting in a fix to the browser.
  • I imagine this same ā€œfeatureā€ would need to be addressed generically for all tabs, not just those with tiddlywiki.
  • Its fantastic @buggyj has found a solution to a subset of cases where this may happen.
    • We would hope that going forward this will not be an essential plugin, to avoid loss.

I contend that this seems more like something that needs to be fixed in Chrome in the long run and other Chrome dependant solutions should cause a response from the Chrome developers.

  • Otherwise if its only a TiddlyWiki issue perhaps TiddlyWiki or its savers etc… needs @buggyj’s solution embedded.
  • This is speculation on my part because It is not a problem in my use case
  • I am trying to find what gives rise to this problem that needs the patch

In short, any issue that threatens the lost of tiddlywiki content is a serious matter.

The main problem is that chrome is not calling the usual page unload events, and thus does not respond to pages that usual would ask the user to confirm their closing. Perhaps they will fix this.

I do not know under what condition discards will occur, but I want to ensure that data is not lost.

Although I hardly ever use chrome I saw that writing the browser extension would be fairly easy for me and so I wrote it for chrome users. So I will not be doing a lot of testing for this.

It appears that the ā€˜performance’ section of the ā€˜settings’ does not appear until version 111.