* tc-body transparent if background attachment
if you go fullscreen with the fullscreen button, the tc-body background color hides the background attachments - so make it transparent if $:/themes/tiddlywiki/vanilla/settings/backgroundimage isn't empty
* if background attachment macro
macro to make tc-body background transparent
`[[Open file|c://users/me/index.html]]` is a wrong syntax for linking in wikitext.
`c://users/me/index.html` is not even a valid URI, although `[ext[Open file|c://users/me/index.html]]` works with Google Chrome and Microsoft Edge on Windows 10.
`[ext[Open file|c:\users\me\index.html]]` works with Chrome, Edge and Firefox on Windows 10.
For clarity, the absolute file syntax needs to be added in the first section before relative links are shown.
All the examples from the top section should be echoed in the extended section.
@bramchen I read a (translated) Chinese article about TiddlyWiki over the holidays that mentioned that the first thing for Chinese users to do was to change the minimum search length. Do you think it's useful to bake the setting into the plugin(s)?
Spending a bit more time with Chrome dev tools, and further to 254e1ca, this optimisation reduces the rendering time for the sample TOC from 1.9s to about 0.9s...
I noticed that the rendering of a TOC with around 200 entries seemed frustratingly slow.
First, I analysed the execution of the code using the Chrome developer tools "timeline" tab: prepare by switching to the "Tools" tab, then start profiling, switch to the "Contents" tab, and then stop profiling once it has displayed. I then used the "bottom-up" view to dectermine that the various Object.keys() calls in the main wiki store were taking around 500ms of the overall time.
Before making any code changes, I also used TW's built in instrumentation to get some baseline timings: I found that the main refresh cycle was taking around 3.0s when rendering the Contents tab.
I then performed the attached simple optimisations of caching the list of tiddler titles and the list of shadow tiddler titles.
The results bring the overall main refresh time down to about 1.9s, a nearly 50% improvement.
The moral of the story is that the first rule of optimisation is measurement...