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

@items is never frozen during compilation #795

Closed
query opened this issue Jan 8, 2016 · 4 comments
Closed

@items is never frozen during compilation #795

query opened this issue Jan 8, 2016 · 4 comments
Milestone

Comments

@query
Copy link

query commented Jan 8, 2016

This means that sorted_articles and friends inefficiently loop through the site's items no matter when they're called. I have a blog that defines a couple of helpers on top of sorted_articles to build archives by month and tag, and compilation is painfully slow.

This is version 4.1.1 on Ruby 2.3.0.

@denisdefreyne denisdefreyne added this to the 4.1.2 milestone Jan 9, 2016
@denisdefreyne
Copy link
Member

This one’s a little tricky because the item views are never frozen explicitly—but I suppose they should mirror the frozen-ness of the backing entity. Fix coming up.

@denisdefreyne
Copy link
Member

WIP fix is in #797.

@denisdefreyne
Copy link
Member

This is now fixed by #796 in the release-4.1.x branch and will be part of the 4.1.2 release.

Can you verify that this fix works for you? The simplest way to use this branch is to update the nanoc line in your Gemfile to say the following:

gem 'nanoc', github: 'nanoc/nanoc', branch: 'release-4.1.x'

@query
Copy link
Author

query commented Jan 27, 2016

Yup, this works. Compile times went down from minutes to less than 15 seconds. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants