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
It's quite sad that I'm running into real slowness when trying to apply mkdocstrings.
Anyway, I ran some profiling on a site with a lot of doc objects, and found that over half of the time (of the whole site build) is spent in fix_refs. It's probably not a surprise that it's slow, but it's really that slow. So if anyone's looking to improve performance, look at this first.
The text was updated successfully, but these errors were encountered:
Define a "transport representation" for autorefs:
<span data-mkdocstrings-identifier="SomeIdentifier">SomeHTML</span>
First a native Markdown extension translates from the usual `[SomeMarkdown][SomeIdentifier]` to the above, and then the post-process replacement mechanism (which is kept in the same place as before) doesn't need to be so careful and complicated, it just indiscriminately replaces such exact strings.
This is a very big boost in performance and I think is more future-proof.
Other mkdocstrings handlers are also free to use this mechanism: define whatever syntax for autorefs that they need and then insert this exact HTML themselves, for the postprocessing to pick up later. It used to be possible to insert the square-brackets Markdown before, but that was very fragile.
Issue #187: #187
PR #188: #188
It's quite sad that I'm running into real slowness when trying to apply mkdocstrings.
Anyway, I ran some profiling on a site with a lot of doc objects, and found that over half of the time (of the whole site build) is spent in
fix_refs
. It's probably not a surprise that it's slow, but it's really that slow. So if anyone's looking to improve performance, look at this first.The text was updated successfully, but these errors were encountered: