In any case, I've worked out some potential ways of addressing this, and (I think?) I emailed you the details.
]]>I'm working from home on a very fast computer but with only ordinary internet speed (4Mbs) and it is painfully slow.
I would now go so far as to say that this should be off by default. I'm not sure that people are going to realise that it's the preview that is making the site slow and that they can turn it off, and they may just decided that MO is too slow to use (that's one reason why I never use planetmath). Make it easy to turn on, by all means, (and with a warning that it might slow things down), but please, please, please don't have it on by default.
]]>I'd actually be happy with turning off the markdown live preview. It's frequently "below the fold" so I don't see it as I type, and as a die-hard TeX-addict, I have no use for the ability to see what it will look like as I actually type it. Of course, I understand that there are people that aren't enlightened, which is why I'm prepared to compromise on the "turn off annoying feature" button - and also I'm aware that turning off the full preview maybe beyond your powers but if the live mathematics preview can be turned off, that'd be great. And cookies are great too so I don't have to keep remembering it.
]]>Another approach is to only generate the full preview when the user's input has been idle for more than some amount of time (maybe 1 second)
A slightly more complicated approach is to time how long it takes the preview to generate, and use that number to throttle how often a new preview is generated (i.e. if a user's browser is taking 1 second to generate a preview, then the preview should be generated much less frequently than if their browser could generate the preview in 1ms)
]]>Actually, having said that then I perhaps ought to test this new feature at home before complaining about this specifically, but my general point is still valid: don't add features just for the sake of adding them. Rather, make it easy for people to add themselves. If you put an "add bookmarklet" button somewhere that easily installs this then I can add it to my work computer and not on my home computer.
]]>Note: I've only verified that this works in Chrome and FireFox
If you'd like to have a live preview of the $math$ formatting as you type, you can use the following scriptlet:
javascript:if($("#wmd-preview:visible").length){$("#wmd-preview").hide().after("<div style='background-color: #dadada; border: 2px dotted white; font-size: 107%; clear: both; line-height: 130%; margin-top: 14px; padding: 3px; width: 660px;' id='math-preview'></div>"); $("#wmd-input").keyup(function() { jsMath.ConvertTeX('wmd-preview');jsMath.ProcessBeforeShowing('wmd-preview'); $("#math-preview").html($("#wmd-preview").html())}).keyup();$("input[value=Preview Math]").hide();}void(0);
To see what this does:
$e^{\pi i}=-1$ in the editor, note that you see the preview update as you type (i.e. as soon as you type the second $, the preview will show the math)To setup a scriptlet for easy use: