Skip to content

Commit

Permalink
tweak: limit the amount of NodeEvents persist in memory
Browse files Browse the repository at this point in the history
  • Loading branch information
brusherru committed Jul 12, 2023
1 parent e87ad2a commit 4e580d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion desktop/main/reactions/syncToRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default (
$rewards.pipe(map((rewards) => ({ smesher: { rewards } }))),
$activations.pipe(map((activations) => ({ smesher: { activations } }))),
$nodeEvents.pipe(
scan((acc, next) => [...acc, next], <Event[]>[]),
scan((acc, next) => [...acc, next].slice(-1000), <Event[]>[]),
map((events) => ({ smesher: { events } }))
),
combineLatest([
Expand Down

0 comments on commit 4e580d8

Please sign in to comment.