-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lib/trie): only copy nodes when mutation is certain (#2352)
- Only copy nodes when mutation is certain - Should alleviate memory operations and garbage collection load - Trie snapshot helper methods `prepLeafForMutation` and `prepBranchForMutation` - Call `SetDirty(true)` in snapshot trie helper methods - Add test case to reach back full coverage of trie.go - Note there is still full unit test coverage (from `trie_test.go`) making these changes possible/safe.
- Loading branch information
Showing
2 changed files
with
94 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.