-
Notifications
You must be signed in to change notification settings - Fork 143
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
9514: Reduce Java allocations when sending internal node hashes during reconnect #9538
9514: Reduce Java allocations when sending internal node hashes during reconnect #9538
Conversation
…g reconnect Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #9538 +/- ##
=============================================
- Coverage 65.22% 0 -65.23%
=============================================
Files 3257 0 -3257
Lines 123995 0 -123995
Branches 12812 0 -12812
=============================================
- Hits 80881 0 -80881
+ Misses 40062 0 -40062
+ Partials 3052 0 -3052 ☔ View full report in Codecov by Sentry. |
platform-sdk/swirlds-jasperdb/src/main/java/com/swirlds/merkledb/files/DataFileCollection.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Fix summary:
getChildHashes()
method inTeacherTreeView
is replaced with another method,writeChildHashes()
. This new method is expected to write child hashes to the specified output stream in binary format, identical to how list ofHash
objects was previously writtenStandardTeacherTreeView
this method is implemented using the oldgetChildHashes()
and serializing them withSerializableDataOutputStream.writeSerializableList()
VirtualTeacherTreeView
this new method delegates to the underlying data sourceVirtualDataSource
a new method is added for this purpose,loadAndWriteHash()
MerkleDbDataSource
loads hash bytes from disk and serializes them to the output stream, bypassing deserialization toHash
Testing:
swirlds-merkle
are usedFixes: #9514
Signed-off-by: Artem Ananev artem.ananev@swirldslabs.com