Lettera extremely sluggish with large markdown file

Now that Google supports downloads in markdown format from Google Docs…

I have downloaded some large docs, in markdown, and tried to edit them in Lettera.

Example: a 28M file with about 150K words. In Google Docs, no problem editing it.

Running Lettera 1.0.0 on an M3 Max MacBook Pro with 64GB

Problem: almost any edit takes 2-3 seconds with the spinning beach ball.

Even changing a header from J1 to H3. Everything is slow… to make any change.

@REZ2 I’ve seen this happen when you have the same file open in either 2+ tabs or 2+ windows. I just checked with the latest beta version and it’s still occurring in build 4458.

My MD file has 25k words so significantly smaller but I experience the same thing. Just double check if you have the file open in multiple places and if not you certainly have uncovered another bug.

-tom

I’m trying to replicate the issue, but I don’t see any performance issue with the lorem ipsum doc with 160k words.
Also, sounds odd that a 28Mb document is only 150k words.
Any chance you can share the file, maybe via DM?

The Google Doc has many images. Lots of “design” to the document. One of the reasons I want to “reduce” it to markdown textbundle…

I see. How many images the document contains?

One thing that might explain the 28 MB for 150K words: Google Docs’ markdown export usually embeds images as base64 data inside the file itself. That makes the text lines enormous, and editors tend to struggle with very long lines even when the word count is modest. It might be worth searching the file for “data:image” and, if it’s there, moving the images out to separate files (or stripping them) and seeing whether editing gets snappy again.

Good point: the way Google Docs exports images “inline” as text blobs is abhorrent, but cannot be helped. It would be possible to e.g. convert such a document into a .textbundle, extracting the pixel images from the ugly text blobs again.

Essentially ‘exploding’ a Docs export from 1 Markdown file with embedded imagery into 1 Markdown file with many images next to it in one way or another is the nicest way out I personally see.