Skip to content

Commit

Permalink
fix: do not update state while continuing
Browse files Browse the repository at this point in the history
It kills perf as far as I can see.
  • Loading branch information
Ddystopia committed Feb 2, 2024
1 parent b850c80 commit 39bb3c0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/code_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,17 @@ impl CodeRunner {
}
}),
};
let state: RamState = ram.as_ref().into();
let registers = state.registers;
let line = state.line;

dispatch().reduce_mut(|s: &mut Store| {
s.set_registers(registers);
s.current_debug_line = line;
});
if kind == Pause {
let state: RamState = ram.as_ref().into();
let registers = state.registers;
let line = state.line;

dispatch().reduce_mut(|s: &mut Store| {
s.set_registers(registers);
s.current_debug_line = line;
});
}

Some((kind, ram))
}
Expand Down

0 comments on commit 39bb3c0

Please sign in to comment.