Skip to content

Commit 80795aa

Browse files
authored
Dont send no-changes transaction to database (#71)
1 parent 55ee83c commit 80795aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/database.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,11 @@ pub fn send_changes_to_db(
537537
pb.enable_steady_tick(100);
538538

539539
for sql_transaction in generate_sql(old_map, new_map, room_id) {
540+
if sql_transaction.is_empty() {
541+
pb.inc(1);
542+
continue;
543+
}
544+
540545
// commit this change to the database
541546
// N.B. this is a synchronous library so will wait until finished before continueing...
542547
// if want to speed up compressor then this might be a good place to start!

0 commit comments

Comments
 (0)