Skip to content
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

Optimise recording deps on new items #1028

merged 2 commits into from Dec 21, 2016


Copy link

@ddfreyne ddfreyne commented Dec 21, 2016

When an item is added, Nanoc generates a dependency of all items onto this new item. This is done because Nanoc can‘t accurately infer whether a newly added item will cause an existing item to need recompilation. This approach is crude and definitely something I’d like to improve, but at the same time it is also correct, which for me is the most important bit.

Unfortunately, radically changing the directory structure of a site means that dependency generation blows up. While Nanoc is apparently doing nothing (right after Compiling…), it is generating all these dependencies, which takes minutes. On top of that, all these artificially new dependencies make memory usage increase up to the point where my laptop cannot handle it anymore.

This fix: Mark new items as “new”, and when looking up all objects that can cause the outdatedness of a given item, return a single new item (because that’s enough to trigger outdatedness). Do not generate any artificial dependencies.

A longer-term solution would be to introduce a mechanism for determining more reliably whether or not the addition of an item might cause an given item to become outdated.

@ddfreyne ddfreyne force-pushed the quick-new-item-dependencies branch from 1e17aa3 to 6443eaa Dec 21, 2016
@ddfreyne ddfreyne merged commit 1dbe802 into master Dec 21, 2016
1 check passed
@ddfreyne ddfreyne deleted the quick-new-item-dependencies branch Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant