-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
We have an issue where creation and edits of a new empty page results in rebuild that takes 5-20 seconds. I've tried to looking through the debug log, and have found out that hugo dumps things like this:
DEBUG Direct dependencies of "/news/test" (*hugolib.pageState page-2) =>
Where /news/test is some sort of heavy page, containing a lot of references to another pages and pagination. But. It has no references to the newly created page, neither direct nor in form of lists.
I've recreated a simple setup to get the same results. So, the content structure is like this:
content/
├── _index.md
└── news
├── _index.md
└── test
└── _index.md
I create new page as content/news/2024/02/1/index.md. This page is completely unrelated to news/test, but when you create that file, I get this in debug:
DEBUG Received System Events: [CREATE "[projetcRoot]/content/news/2024/02/1/index.md" CHMOD "[projetcRoot]/content/news/2024/02/1/index.md"] Change detected, rebuilding site (#2). 2024-02-21 13:02:30.466 +0300 DEBUG cachebuster: Matching "content/news/2024/02/1/index.md" with source "(postcss|tailwind)\\.config\\.js": no match Source changed /news/2024/02/1/index.md DEBUG Direct dependencies of "/news/test" (*hugolib.pageState page-4) =>
news/test should not have been mentioned at all.
So, rebuilds take more time, since hugo rebuilds completely unrelated pages.
The issue is reproducible on 0.123.1 too, but it is not there in 0.122.