Skip to content

feat: implement max log limit with FIFO eviction#216

Open
chinecherem58 wants to merge 1 commit into
StellarFlow-Network:mainfrom
chinecherem58:feat/max-log-limit
Open

feat: implement max log limit with FIFO eviction#216
chinecherem58 wants to merge 1 commit into
StellarFlow-Network:mainfrom
chinecherem58:feat/max-log-limit

Conversation

@chinecherem58
Copy link
Copy Markdown

Fix: Implement Max Log Limit (FIFO) to Prevent Memory Leak

Problem

The live log feed in src/app/logs/page.tsx accumulated entries indefinitely in browser memory
during long sessions, eventually crashing the tab.

Solution

  • Added a MAX_LOG_LIMIT = 200 constant
  • Applied FIFO (.slice(-MAX_LOG_LIMIT)) at all three points where filteredResults state is set:
    • Initial state from MOCK_LOGS
    • Search worker results callback
    • XDR batch decode merge

This ensures the log list never exceeds 200 entries, always dropping the oldest entries first
when the limit is reached.

Testing

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@chinecherem58 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧹 Perf | Garbage Collection for Live Logs Feed

1 participant