You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The steps of the ExpanderPipeline are dispatched by iterating over the subtypes of this abstract type. The subtypes function is called for every Markdown element processed, meaning that it can easily be called hundreds or thousands of times during a run of Documenter.
However, under some circumstances (possibly involving generated functions or type metaprogramming, see #1261), the subtypes function is extremely slow:
I figure this should be considered a bug in Julia itself and I'm going to file another issue upstream.
That being said, since the issue is currently severely impacting the build times for the docs of Catlab.jl and its dependers, I was hoping that a workaround could be implemented here. A simple workaround would move the call sort(subtypes(T); by = order) from inside dispatch to the body of the main function expand. That would ensure that subtypes is only called once during the ExpandTemplates step.
The text was updated successfully, but these errors were encountered:
The steps of the
ExpanderPipeline
are dispatched by iterating over the subtypes of this abstract type. Thesubtypes
function is called for every Markdown element processed, meaning that it can easily be called hundreds or thousands of times during a run of Documenter.However, under some circumstances (possibly involving generated functions or type metaprogramming, see #1261), the
subtypes
function is extremely slow:I figure this should be considered a bug in Julia itself and I'm going to file another issue upstream.
That being said, since the issue is currently severely impacting the build times for the docs of Catlab.jl and its dependers, I was hoping that a workaround could be implemented here. A simple workaround would move the call
sort(subtypes(T); by = order)
from insidedispatch
to the body of the main functionexpand
. That would ensure thatsubtypes
is only called once during theExpandTemplates
step.The text was updated successfully, but these errors were encountered: