Skip to content

Implement checksum cache#355

Merged
benbjohnson merged 1 commit intomainfrom
checksum-cache
Jun 22, 2023
Merged

Implement checksum cache#355
benbjohnson merged 1 commit intomainfrom
checksum-cache

Conversation

@benbjohnson
Copy link
Collaborator

This pull request makes 2 optimizations to the checksum computation on each transaction:

  1. Changes the checksum map to a slice. This should improve lookup performance.
  2. Add a higher-level caching layer so that contiguous blocks of pages can be calculated once and reused.

This initial optimization only attempts to improve checksums being computed from the database file itself. If any pages in a block are in the WAL file, their cached block checksum is ignored and we recalculate the block by individual pages.

@benbjohnson benbjohnson added the performance Improvements to performance label Jun 21, 2023
@benbjohnson benbjohnson merged commit 462555f into main Jun 22, 2023
@benbjohnson benbjohnson deleted the checksum-cache branch June 22, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Improvements to performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant