August 3, 2022

Make pandoc file conversion faster

You can check why pandoc conversion is slow by appending --trace to the command, for instance:

pandoc document.md -o document.pdf --trace

Pandoc will print the diagnostic of parsing process line by line, roughly.

You can see on which line pandoc slows down; for example if the output of the parsing process is stuck on a line, it means that the following line is causing issue, thus slowing down the parsing process.

For example if the output of the parsing process is stuck on line 24, as shown below, it means that pandoc is having a hard time parsing what comes right after e.g. line 25.

[trace] Parsed [Para [Str "It",Space,Str "is",Space,Str "easier",Space,Str at line 24

To improve the speed at which pandoc is parsing the file, open the file and check what is slowing down parsing right after line 24, a missing square bracket for example.


Reminder: you can always find commands or tips by checking the manual of a programme e.g. man pandoc and searching through the file by entering :/\<keyword\> e.g.:/\<parser\>

The entry for --trace is: Print diagnostic output tracing parser progress to stderr. This option is intended for use by developers in diagnosing performance issues.”


pandoc command line personal computing


No affiliates, No Google Analytics, No Facebook Pixel. © 2016-2022. Content is licensed under a CC BY-NC-SA 4.0.