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
Large inventory files slow the interlinks filter. For sites with many pages (e.g. 100+), this can substantially increase build times.
Background
quartodoc uses this process for handling interlinks:
Running quartodoc interlinks downloads inventory files, and saves them as as json (e.g. _inv/python_objects.json)
The interlinks lua filter (installation, code) does this for each page being rendered:
reads the json files
replaces any uses of interlinks syntax with links derived from the json files
However, this raises the following challenges:
io, parsing: the files must be read and parsed every time a file is rendered. This delay can add up over a lot of files.
lookup: currently, we loop over every entry when looking up a link. This is inefficient, but I suspect fast in human time.
inventories like statsmodels.org are 10MB unzipped, and have ~40,000 entries, so they're not a huge time sink, but it adds up when multiplied by number of files. From what I can tell, it takes the lua filter ~.75 seconds just to read and parse this file (mostly due to parsing json).
Example
Run the following on the files below:
quartodoc interlinks (creates _inv folder with inventory files as json)
Setting the fast option speeds up the loading of interlinks files. Instead of saving as json, it just saves the original inventories as a .txt, and parses in lua. (the json parsing provided by quarto for lua filters is very slow).
Large inventory files slow the interlinks filter. For sites with many pages (e.g. 100+), this can substantially increase build times.
Background
quartodoc uses this process for handling interlinks:
quartodoc interlinks
downloads inventory files, and saves them as as json (e.g._inv/python_objects.json
)However, this raises the following challenges:
inventories like statsmodels.org are 10MB unzipped, and have ~40,000 entries, so they're not a huge time sink, but it adds up when multiplied by number of files. From what I can tell, it takes the lua filter ~.75 seconds just to read and parse this file (mostly due to parsing json).
Example
Run the following on the files below:
quartodoc interlinks
(creates_inv
folder with inventory files as json)quarto render example.qmd --to gfm --output --
_quarto.yml
:example.qmd:
Potential Solutions
In order of complexity:
The text was updated successfully, but these errors were encountered: