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 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.

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

@ddfreyne ddfreyne commented Jan 10, 2016

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.

@ddfreyne ddfreyne mentioned this issue Jan 10, 2016
@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Jan 10, 2016

WIP fix is in #797.

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Jan 10, 2016

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'

@ddfreyne ddfreyne closed this Jan 10, 2016
@query
Copy link
Author

@query 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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants