refactor: update journal mode comment for DatabaseService and optimize CPU state check in EditorLayout

This commit is contained in:
SaelixCode
2026-02-27 11:10:35 -05:00
parent b95838ae9c
commit 91cafb49f9
2 changed files with 8 additions and 3 deletions
+7 -1
View File
@@ -197,10 +197,16 @@ export default function EditorLayout() {
const netIO = `${formatBytes(rxRate)}/s ↓ / ${formatBytes(txRate)}/s ↑`;
// Check if values actually changed to prevent infinite re-renders
const newCpu = cpuPercent + '%';
if (prevStat && prevStat.cpu === newCpu && prevStat.ram === ramUsage && prevStat.lastRx === currentRx && prevStat.lastTx === currentTx) {
return prev;
}
return {
...prev,
[container.Id]: {
cpu: cpuPercent + '%',
cpu: newCpu,
ram: ramUsage,
net: netIO,
lastRx: currentRx,