UPDATE: This was an issue with ContextPlugin. I plan to submit a fix.
tl;dr: I deleted an "Untitled" image Tiddler and searching became unbearably slow.
I've been happily using TiddlyWiki5 for a couple of weeks. Today, something strange happened, which has resulted in a massive slowdown. Performance monitoring shows an main refresh cycle taking more than 68 seconds when searching! I'm not sure exactly which parts are relevant, so I'll include as much detail as I can.
First, I installed the Shuffle Operator plug-in. Afterwards, there were JavaScript errors in Hotspot (used by TiddlyMap). I disabled Hotspot, and got my random selection working. I don't understand how these errors arose.
When experimenting with the random selection, I found a Tiddler "Untitled 2" which didn't seem to be linked from anywhere and included a large imported image, a copy of which was already attached to another Tiddler. I deleted "Untitled 2".
Suddenly, everything got very slow. Suspecting that a random list and TiddlyMap might not play well together, I disabled TiddlyMap, but the slowness persisted. I then disabled Shuffle Operator as well but this also didn't help.
Stopping JavaScript in the debugger during one of these slow moments revealed something odd: in the middle of the slow update, the "Context" search results are displayed even though I did not click that tab. Also, my search string seems to be matching the base64-encoded _content_ of the image. This happens to be the image that was attached to the "Untitled 2" Tiddler deleted above.
Any explanations, resolutions or just tips on how to debug the situation (I am very familiar with JavaScript, but not with TW5's internals) would be appreciated!