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

Avoid double calculation of checksum #789

Merged

Conversation

@RubenVerborgh
Copy link
Contributor

@RubenVerborgh RubenVerborgh commented Dec 31, 2015

The new checksum of objects is currently calculated twice:

  1. for checksums_available?
  2. for checksums_identical?

Since checksum calculation can be costly, this commit memoizes its calculation.

This speeds up the compilation of my site with 20% in case of no changes.

The new checksum of objects used to be calculated twice:
1. for checksums_available?
2. for checksums_identical?
Since checksum calculation can be costly, we memoize its calculation.
@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Dec 31, 2015

Thanks!

Loading

ddfreyne added a commit that referenced this issue Dec 31, 2015
…lation

Avoid double calculation of checksum
@ddfreyne ddfreyne merged commit 56c927d into nanoc:release-4.1.x Dec 31, 2015
1 check passed
Loading
@ddfreyne ddfreyne added this to the 4.1.1 milestone Dec 31, 2015
@ddfreyne ddfreyne added this to the 4.1.2 milestone Dec 31, 2015
@ddfreyne ddfreyne removed this from the 4.1.1 milestone Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants