♻️ Refactor: cleanupMarkers util eingeführt für alle Marker-Typen + Feature: Heap-Memory-Monitoring über Redux-Slice mit Auto-Reload bei >8GB

This commit is contained in:
ISA
2025-06-06 11:36:06 +02:00
parent 1ec0a8a611
commit 51d2d58f8e
6 changed files with 67 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
heapBytes: 0,
heapMB: 0,
lastUpdated: null,
};
export const heapMonitorSlice = createSlice({
name: "heapMonitor",
initialState,
reducers: {
updateHeap(state, action) {
state.heapBytes = action.payload;
state.heapMB = +(action.payload / 1024 / 1024).toFixed(2);
state.lastUpdated = new Date().toISOString();
},
},
});
export const { updateHeap } = heapMonitorSlice.actions;
export default heapMonitorSlice.reducer;