File size limitation error appears despite .md file extension
I am trying to view a big .md file that I generated, and Marked displays the error shown in the attached screenshot. The ending of the file is clearly .md, so I was wondering if this is an app bug?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Marc Liyanage on 14 Jul, 2012 01:37 AM
The size of the file in question is 9.2MB.
Support Staff 2 Posted by Brett on 14 Jul, 2012 03:04 AM
9.2MB is more than Marked can process at one time. You can bypass the limitation by using the include syntax and breaking it up into smaller chunks, but the performance will not be very good:
`<<(section1.md)`
Is this 9.2MB file purely text? Entire novels are smaller than that…
3 Posted by Marc Liyanage on 14 Jul, 2012 03:55 AM
Yes, it is a concatenation of a bunch of text files (system log files), and I tried to use Markdown header syntax to make it easy to navigate between the sections. I intended to use Marked as a viewer for it.
No problem if this is considered an exotic, unsupported use case, but out of curiosity, are you using that C-based Markdown implementation, or some scripting language implementation? I would expect the C implementation to cope with this size easily.
Support Staff 4 Posted by Brett on 14 Jul, 2012 04:24 AM
It's currently using MultiMarkdown as a static library, but the next version has the option to use Discount instead. The biggest issue isn't the processor, though, it's the additional DOM manipulation that's done to generate the table of contents, bookmark navigation, finding the first diff after update, etc. Scanning for text changes in a 10MB file would cause delays that would frustrate even the most patient users.