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
merged 1 commit into from Dec 31, 2015

Conversation

Projects
None yet
2 participants
@RubenVerborgh
Member

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.

Memoize checksum calculation.
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

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Dec 31, 2015

Member

Thanks!

Member

ddfreyne commented Dec 31, 2015

Thanks!

ddfreyne added a commit that referenced this pull request Dec 31, 2015

Merge pull request #789 from RubenVerborgh/fix-memoize-checksum-calcu…
…lation

Avoid double calculation of checksum

@ddfreyne ddfreyne merged commit 56c927d into nanoc:release-4.1.x Dec 31, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ddfreyne ddfreyne modified the milestones: 4.1.1, 4.1.2 Dec 31, 2015

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