tag:support.multimarkdown.com,2013-02-12:/discussions/problems-v4/4867-bug-toc-slow-to-open-on-large-fileMultiMarkdown Software, LLC: Discussion 2022-03-04T17:29:19Ztag:support.multimarkdown.com,2013-02-12:Comment/485947252022-03-04T17:29:19Z2022-03-04T17:29:19ZBug: TOC slow to open on large file<div><p>Going back through open issues that didn't have a solution or was still<br>
working on.</p>
<p>The delay when toggling the TOC is related to adjusting the text editor<br>
view, not loading the TOC data. If you put the insertion point at the<br>
top of the document and toggle, it's fast. If you are at the bottom,<br>
it's slow. This is part of macOS, and to my knowledge there is not much<br>
I can do about it.</p>
<p>The TOC data is cached, but when the TOC is hidden there is no reason to<br>
update the data (e.g if someone never uses the TOC, they shouldn't take<br>
the performance hit of updating it with every keystroke.) So when you<br>
toggle the TOC on, it needs to be updated. But this delay comes after<br>
the TOC appears (if your insertion point is at the top).</p>
<p>You can demonstrate this by cutting all text, then collapsing the TOC.<br>
Paste the text back in, move insertion to top, and then expand TOC.<br>
You'll see a slight delay before the TOC contents are loaded, but the<br>
panel expands quickly.</p>
<p>Replacing the data in MMDC v4 is a bit slow, but again not the primary<br>
issue here. Regardless, MMDC v5 uses a different approach that is much<br>
faster overall, but it doesn't change the text layout issue that is the<br>
primary problem.</p>
<p>If you're interested in the "almost-beta" of v5, you can download here:</p>
<p><a href="https://s3.amazonaws.com/files.multimarkdown.com/composer5/MMDComposer5-2022-03-02.zip">https://s3.amazonaws.com/files.multimarkdown.com/composer5/MMDCompo...</a></p>
<p>Fletcher</p></div>Fletcher