The obvious downside is that the preprocessing task is run twice, first when mdbook invoke mdbook-katex as a preprocessor, second when mdbook invoke mdbook-katex as a renderer, so the time mdbook-katex runs doubles.
On a numerical note, it used to take 3 seconds for me to build my notes, and it decreased to about 1.3 seconds after I made the performance improvement earlier today. As a comparison, removing mdbook-katex related processing from book.toml and building it yields 350ms. So, mdbook-katex is slow in this regard.
The real question is why @Matthewacon added the Rendererimpl. I believe it must be of some deeper reason.
mdbook-katex
plays a role of a renderer since this.The obvious downside is that the preprocessing task is run twice, first when
mdbook
invokemdbook-katex
as a preprocessor, second whenmdbook
invokemdbook-katex
as a renderer, so the timemdbook-katex
runs doubles. On a numerical note, it used to take 3 seconds for me to build my notes, and it decreased to about 1.3 seconds after I made the performance improvement earlier today. As a comparison, removingmdbook-katex
related processing frombook.toml
and building it yields 350ms. So,mdbook-katex
is slow in this regard.The real question is why @Matthewacon added the
Renderer
impl
. I believe it must be of some deeper reason.