Skip to content

Commit

Permalink
Merge pull request #2026 from AntelopeIO/remove_perrow_tellp_5x
Browse files Browse the repository at this point in the history
[5.0] remove per-row `tellp()` during snapshot creation boosting performance
  • Loading branch information
spoonincode authored Jan 2, 2024
2 parents 574f430 + 53130ef commit 91dea83
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions libraries/chain/snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,7 @@ void ostream_snapshot_writer::write_start_section( const std::string& section_na
}

void ostream_snapshot_writer::write_row( const detail::abstract_snapshot_row_writer& row_writer ) {
auto restore = snapshot.tellp();
try {
row_writer.write(snapshot);
} catch (...) {
snapshot.seekp(restore);
throw;
}
row_writer.write(snapshot);
row_count++;
}

Expand Down

0 comments on commit 91dea83

Please sign in to comment.