Open RyanGreenup opened 1 month ago
Thanks for the detailed report!
My first thought is that the explorer component gets calculated for every page. (despite being the same on every page)
This means that as the number of pages increases, both the number of explorer components that are parsed increase AND the number of elements inside the explorer component.
Basically, every page added adds an extra cost to every other page as well.
We should probably look into a way to calculate the entire explorer tree only once per site build, instead of per build per page.
@RyanGreenup do you have an example repo to reproduce your tests? I want to do some experiments, especially regarding the sort
function, as that was introduced fairly recently.
hm Quartz memoizes the explorer file tree, this shouldnt happen, a repro would be helpful here
can you see if https://github.com/jackyzha0/quartz/commit/16a9caa555a2d63b7ff8af0731fbfd3231d6225c fixes it?
can you see if 16a9caa fixes it?
I put together a python script in this exemplar repo.
I'll check this when I get back from work.
Thanks for the quick turn around!
I'll double check my work and run it over more docs when I get home, but it doesn't look like it made a difference:
Ah can reproduce on my end, thanks for the script, I'll take another look tomorrow when I have some spare time
Problem Statement
The Exponent Component (see also Explorer in the docs)) of Quartz causes a non-linear build time, For example with the default sort function:
Proposed Solution
Either one of the following would solve this issue
Methodology
Description
Clone a fresh repository
Setup with relative links and default content directory
Copy the `index.md` into separate files
Build the site and time the duration
Comment out the component in
quartz.layout.ts
Here's the basic idea in python
System
npm --version
node --version
Additional Notes
This doesn't seem to occur for
defaultListPageLayout
, however, this may be due to a limited number of directories in my experiments.