RESOLVED Markdown editing slow in WYSIWYG mode

I mainly use Markdown files to organize personal notes. I notice that MD editing becomes very slow in some cases, while the WYSIWYG mode is enabled (Settings > Media > Markdown > WYSIWYG-editing).

The problem
Eventually, Markdown editing gets very slow, until the point where each letter appears on the screen with a 1-second delay.

The problem is clearly caused by use of many footer links, but I’ve also had other documents without footer links that had the same behavior. Maybe, it’s generally caused by links

Markdown should be lightweight, but this behavior makes it useless.

Here’s what I’ve tried to solve it:

  • Restarting DEVONthink multiple times
  • Rebooting the Mac
  • Remove custom markdown CSS
  • Use markdown editor only (instead of split-panel for editing and preview)
  • Completely disable WikiLinks

Nothing worked. The only solution to fix those delays is to disable WYSIWYG mode

Sample Content

Create a new Markdown document with the following content in WYSIWYG mode.
Then add a third list item, e.g. * This is the third list item and watch each character appear one … by … one…

# This is a Markdown document

### Section 

* This is [a line][1]
* This is [another line][2]


Which version of DEVONthink and of macOS do you use?

Hi @cgrunenberg thanks for your fast response!

I’m using DEVONthink 3.7.3 (Pro-Edition), on a MacBook Pro 2018 running macOS 11.4.

Meanwhile, I’ve done some other tests and I found a second reason/solution:

The problem also disappears when I switch to a default font (like Open Sans or Helvetica Neue)
Editing slows down when using the custom font FiraCode Nerd Font.

The latest public release is actually 3.7.2.

Confirmed typo :slight_smile:

Which one did you actually use? The latest internal build works fine using FireCode Regular 11pt.

Thanks for looking into this issue! I experience problems with the “Fira Code Nerd Font Complete Mono, 11px”.

Below is a screencast that compares the performance with Fira Code vs Helvetica Neue:

Also, here’s a quick addition that shows how the footer links impact the performance:

I’m happy to provide any other details you need.

Thanks for the screencast! The latest internal build works fine over here using this font.

Thanks for the feedback! Looking forward to the next update :slight_smile:

1 Like

Was there an update on that issue so far? In the latest DT version (will post the version afterwards), the problem is till there (or returned): slowed down/laggy Markdown rendering and editing with activated live preview in junction with a bunch of links within the currently displayed text part. I.e., it doesn’t matter wether it’s a link in a footnote, Markdown link („[text](link)“) or Alias link (auto-detected/highlighted by DT) - any (visible) cluster of detected and bluish highlighted links causes the lag. Also, the text length has no effect: you can scroll and edit smoothly within a very long text, until you reach a text part with some (more) links. My so far workarounds are:

  • Convert all Markdown links to Markdown reference links („[text](link)“ —> „[text] …. [text]: link“) and put the references to the bottom of the document. This helps so far unless you scroll down to the bottom :sweat_smile:
  • or: shortly switch from edit to preview mode and then back to edit mode. This actually helps unless you scroll to another text part with some (more) links.

Please let me know if I can help with further information.

Are you saying that the preview mode is slow or that both preview and edit mode are slow? In the first case, you could simply work in edit mode and switch to preview only when you really need it.

1 Like

Sorry: the lag occurs only in edit mode. Everything works smoothly in preview mode though.

Then a new thread with a correct title might have been a good idea.

1 Like

And do you use a specific plain text font or the default one? See Preferences > Editing

1 Like

Yes, I’m using a specific plain text font: Helvetica (or Helvetica Neue - will check it when I’m back at my Mac)

I will set the plain text font back to default (later) just to ensure/check if this causes the error.

Do you still experience this after switching back to the default font? Press the Option modifier key in Preference > Editing to reset fonts.

1 Like

I reseted the plain text font to default (using the Option modifier key) and this had no effect. I also switched back and forth (from default (Menlo) to Helvetica to default), without an effect regarding the lagging-issue.

I turned the Wikilinks on and off as well as the WYSIWYG editing mode – also with no effect.

I forgot to mention (as I rarely do it): If I open the inspector or resize the window, which of course leads to a new text wrapping, the Markdown window (in edit mode) lags or gets even frozen – for a time depending on the amount of links and length of the text. If I repeat the same steps in preview mode, everything works fine.

I’m using Devonthink 3.8.2 on macOS Big Sur (M1 chip, MacBook Pro 2020).

Meanwhile I did some more tests. I now think that turning off the WYSIWYG editing mode indeed has an effect: All lagging vanishes while this mode is turned off (regardless whether the plain text font is set to the default font or sth else). Furthermore, the more formatting markup commands the Markdown text contains ("#, ##, …", “**bold**”, "*italics*, "_italics_, “==highlighting==”, “[link text](link)”, …), the slower the rendering (in edit mode) becomes. It seems, that the lagging issue does not only concern links, but any Markdown formatting (or their amount) while WYSIWYG is turned on.

Which version of macOS do you use? In addition, an example document would be great - thank you!

1 Like

Sorry for my delayed reply. I’m using Devonthink 3.8.2 on macOS Big Sur 11.4, M1 chip, MacBook Pro 2020.

In the meantime, I’ve created a screencast with a Wikipedia entry (Blackbirding – Wikipedia) as an example (I copied the entry w/o the images, but preserving all formatting and links):

It shows the lag in editing mode while reaching a text part with many formatting (here: the links) or the uppermost heading, while in preview mode everything runs smoothly as well as in editing mode with deactivated WYSIWYG. As mentioned above, changing the plain text font to its default does not affect the lagging. I tried to turn off all extensions (MathJAX, Mermaid, Prism), also without an effect.