Fsnotes: [REQ] Allow contiguous layout in non-Markdown editing

Created on 24 May 2019  Â·  11Comments  Â·  Source: glushchenko/fsnotes

I've been using nvALT for _many_ years, but grabbed a copy of FSNotes from the App Store to show my support for the development of a replacement and have been trying it out as a replacement.

I have a note that is around 300 lines long. It has Markdown formatting (mostly # and ## headers, and lots of lines that start with a - or * as part of a list.)

When I select the note in FSNotes, the entire file does _not_ appear to get loaded immediately when you start to scroll. I will select the note, and then start swiping up on my touchpad, and I will get to a "bottom" position that isn't _really_ the bottom, and then more of the note loads.

Even if you scroll somewhat slowly, you reach an artificial bottom, have to stop scrolling, and let it "recalculate" so you can start scrolling again. I expect to be able to go to the actual bottom of the note.

Once the note is fully loaded, if I swipe up/down I _do_ get to the top/bottom as I expect. But if I go to another note and then go back to this note and swipe to scroll, it again stops before the real end of the note.

If I enable Focus in editor when selecting note, I can quickly press Cmd+DownArrow after selecting the note and it jumps to the bottom immediately, but scrolling via the trackpad stops ~60 lines from the bottom.

done request

All 11 comments

What version are you using?

Recently #570 fixed slow loading of some notes

Sorry, meant to include that key piece of info. I'm running 3.2.0 (261).

Can you share a sample note? Feel free to craft a nonsense one or mangle an existing one

Here's a sample note that shows the problem: FSNotes-test.txt I copy/pasted that in to a new note and it exhibits the behavior I'm describing.

When scrolling from the top of the note (and only if you have _not_ yet reached the bottom previously) FSNotes will stop before the os at the bottom of the file appear... and _then_ the rest of the note "loads".

I have FSNotes configured to use the "TextBundle" container and the "Markdown" format. Let me know if there's any other info I can provide to help you reproduce.

Hi, @eddyg!

You are right, text not loaded fully. By default "non contiguous layout" enabled

https://developer.apple.com/documentation/uikit/nslayoutmanager/1403197-allowsnoncontiguouslayout

Thats allow achieve best performance. Disable of this – bad for loading long texts.

Is there any way to disable "non contiguous layout"?

This is likely a deal-breaker for me. As I mentioned, I've used nvALT for _years_ and it is extremely performant (one of its biggest strengths). Not having an entire note loaded into the "layout" is noticeably annoying, or else I wouldn't have opened this issue.

Is an 11KB / 300-line note really too big or too long for today's computers to handle?

I can add option in preferences, no problem

Thanks for the quick reply! An (experimental?) preference sounds great.

I'll be anxious to see if there is a noticeable performance impact when enabling "contiguous layout".

There is, that's why #570 was created @eddyg and you can try 3.0.3 or earlier to see that performance.

Ah, I see. Is the problem the syntax highlighting for Markdown and "Live Image" preview capability that make rendering the text more complex?

If so, perhaps the solution is a preference to enable a _non_-Markdown-enhanced editing mode which would enable the contiguous layout option but have a no-frills plain-text editor (ala nvALT) so it isn't "slow"?

Non contiguous layout disabled in 3.6.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sepich picture sepich  Â·  3Comments

shurain picture shurain  Â·  3Comments

floodfish picture floodfish  Â·  4Comments

peanutputter picture peanutputter  Â·  4Comments

ebsmv picture ebsmv  Â·  4Comments