5
$\begingroup$

While I was writing an answer to this question, my browser tab crashed. That's a browser bug, obviously, not a Stack Exchange bug, but it's also partly two Stack Exchange bugs:

  1. The preview code is obviously being too demanding on the browser.
  2. Stack Exchange saved a draft of the answer, but that draft was missing about 90% of what I'd written, which is pretty useless.

My browser is Chrome 85.0.4183.121 on Linux/x86_64. I blame the crash on the preview code because I noticed that as I was typing, the preview updates took longer and longer (maybe about ½ second just before the crash). Previews have been consistently taking longer than they used to (it's a noticeable amount of CPU time, even without MathJax or code formatting) for the past few months; I'm pretty sure this started with the switch to CommonMark, because I noticed it happening without a browser upgrade (or even restart) and as far as I recall now this is the Stack Exchange change that had just happened. My answer was moderately MathJax-heavy, with about 20 simple MathJax fragments: I've written answers that were a lot heavier in the past, but none since the markdown engine switch.

Eventually, at one point, a preview update locked the tab up for several seconds of CPU activity, then the tab crashed with an “Aw, Snap!” message indicating a SIGTRAP. I didn't have time to check the memory usage before the tab crashed, but it can't have been that bad, because my system (which has swap) wasn't thrashing.

Unfortunately, I don't have a copy of what I had typed. I may or may not post something vaguely like it later if I have the courage to write it again.

$\endgroup$
4
  • $\begingroup$ I haven't noticed any performance issues after the CommonMark migration, but I have lost large parts of answers before, where it turned out only a small part of the draft was saved. I guess we may be able to blame caching on that one, judging from how the system is (was?) implemented. Still, pretty annoying. I tend to save a local copy of drafts nowadays when I start to suspect things are breaking. $\endgroup$
    – Discrete lizard Mod
    Commented Oct 12, 2020 at 18:06
  • $\begingroup$ Is this still happening? We've tried a few repros, but everything seems to be working fine. (To be fair, not 100% sure if those attempts were on Linux. I'm going by internal ticket notes here.) If you're still seeing perf issues, though, can you include a sample of the input that causes them, please? $\endgroup$
    – Adam Lear StaffMod
    Commented Feb 20, 2021 at 0:29
  • $\begingroup$ I couldn't reproduce it. But I don't know what I'd typed… My original answer was more MathJax-heavy than what I finally posted. I'm not so much concerned about the crash, really (after all, it's the browser's fault) than about the unreliability of drafts. I find that when I accidentally move away from an answer I'm typing (browser crash, following a link, closing a tab) and come back, SE has invariably saved a draft (assuming I wasn't composing more than one answer on the same site), but it's usually lagging behind. $\endgroup$ Commented Feb 20, 2021 at 13:41
  • $\begingroup$ @Gilles'SO-stopbeingevil' Cool, thanks. We'll take a look at drafts to see if we can make them more accurate while we're working on the new editor. In the meantime, please let me know if you happen to crash a tab again. $\endgroup$
    – Adam Lear StaffMod
    Commented Mar 11, 2021 at 22:42

0

You must log in to answer this question.

Browse other questions tagged .