New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build time exploding with many pages #8066
Comments
@klieret Thank you for opening an interesting ticket. Follow these steps to do so:
|
Thank you for your incredibly fast reply! Stripping down I think the culprit is the navigation in |
Thank you for testing.
Probably. There is a Liquid |
Ah..! What your test script does is to copy the If anything, this ticket can serve as a call for the need to optimize the include in the minima theme.. |
Ah, perhaps I should have stressed that: As in the code snippet above, I was considering a case with many pages (the markdown files are created in the |
Exactly! |
I'll open a report in the minima theme then! Thanks a lot for helping me figure this out! |
@klieret If you'd like to experiment, we've a pull request here on gem 'jekyll', github: 'jekyll/jekyll', ref: 'refs/pull/7992/head' Now running |
Indeed, wow! This makes a huge difference, reducing the time from 75s to just 6.5s (150 pages)! Thanks for pointing this out, can't wait till the 4.1 release :) |
@klieret 75s for 150 pages is a lot. Even on Windows, the build times were just 30s for 150 pages (with Jekyll 4.0 released gem) I'm curious. Will you be able to plot a graph for the test-site builds with the above PR branch..? Thanks. (You can easily avoid the disk-cache when using that branch by passing |
Hmm, perhaps my system was busy yesterday, I can't quite reproduce the high numbers. But I just ran the normal v4.00 version and the #7992 branch a couple of times and get the following: So the behaviour stays the same (and is probably due to the scaling of the |
What's |
Oh I just noticed that the curves are identical but for a factor of ~1.8, so |
Ah! Lastly, may I know how you generate the graphs..? |
More boring than you'd think (unfortunately), I just jotted down the numbers import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots()
n_files = [10, 50, 100, 150, 200]
ax.plot(
n_files,
[0.323, 1.5, 4.416, 10.92, 19.184],
color="black",
label="v4.0.0"
)
ax.plot(
n_files,
[0.452, 0.704, 2.098, 5.442, 11.483],
color="red",
label="new"
)
ax.plot(
n_files,
1.8*np.array([0.452, 0.704, 2.098, 5.442, 11.483]),
color="yellow",
label="1.8*new"
)
ax.set_xlabel("Number of posts")
ax.set_ylabel("Seconds to build")
ax.legend() But it would be probably easy to write a short shell script to automatize the number taking to some csv file and then load this I assume. |
😃 When it comes to crunching data, Python's got you covered.. hehe.. |
My Environment
jekyll
github-pages
Expected Behaviour
The build time with n identical pages should scale linearly (or in other words, the build time of a single page should stay constant).
Current Behavior
The build time per page (!) grows to more than a second per page (!):
Code Sample
Speed testes as follows:
Further investigations
build --verbose
one can see that the time is spent per page, rather than e.g. at the beginning or endThe text was updated successfully, but these errors were encountered: