A worker thread works in practice, but the GIL takes a significant toll
as the code is computationally heavy. The result is a hogged UI,
specially when other threads are involved (eg. markup handler).
A worker process is faster, hogs the UI significantly less, at the cost
of slightly higher memory usage.
Deferring to Pandoc is not without its faults. It still requires
processing (eg. horizontal rules turning into 72 dashes). It is
significantly slower and resource hungry.
On the reverse, the markup regexps have improved over time and are able
to handle the task.
Pandoc's conversion to plain text converts horizontal rules to a
sequence of 72 dashes. This update ensures that subsequent dashes
are ignored when counting characters.
The new stats counter is able to count characters, words, sentences, and
reading time.
It does so more accurately than before, by leveraging Pandoc's plain
format, and a few simple regular expressions that besides accuracy, also
improve support for Asian languages. It's all done on a background
thread to avoid hogging the UI.