Skip to content

Improve frontend: only get Kernel/Journal when needed#4025

Open
joaoantoniocardoso wants to merge 5 commits into
bluerobotics:masterfrom
joaoantoniocardoso:fix_frontend_deterioration_over_time
Open

Improve frontend: only get Kernel/Journal when needed#4025
joaoantoniocardoso wants to merge 5 commits into
bluerobotics:masterfrom
joaoantoniocardoso:fix_frontend_deterioration_over_time

Conversation

@joaoantoniocardoso

Copy link
Copy Markdown
Member

During my tests, it was found that there's an initial ~22 + linear ~5 MB/h of Chrome heap growth just from Journal+Kernel, regardless of the page loaded. This certainly is not the single or greatest cause of instability, but can be a contributor.

The strategy here is to only connect the WebSocket when we need it, which is not even common.

Note: In 1.4, we only have the Kernel ones, so this can be a contributor to why the 1.5 frontend is heavier than 1.4.

@joaoantoniocardoso joaoantoniocardoso added the move-to-stable Needs to be cherry-picked and move to stable label Jul 24, 2026
@github-actions

This comment was marked as resolved.

…bSocket subscribe API

Stop opening kernel and journal WebSockets (and the journal REST fetch) at
SPA boot. Expose subscribe/unsubscribe helpers that open sockets on demand
and clear buffers when the last consumer leaves.
…om tab views

Open the lazy WebSocket subscriptions when Kernel and Journal mount, and
unsubscribe (clearing buffers) on destroy.
Only mount the selected tab content so Kernel/Journal tear down their
WebSocket subscriptions when leaving those tabs (Vuetify otherwise keeps
visited tab components alive).
v-tabs uses a numeric index and the active-tab v-if compares against
numbers; start at 0 so the first tab mounts immediately.
…al REST paths

Kernel and journal data now come only from the lazy WebSocket subscribers;
drop the orphan FetchType cases, mutations, and fetchKernelMessage action.
@joaoantoniocardoso
joaoantoniocardoso force-pushed the fix_frontend_deterioration_over_time branch from bf350a5 to 4ec2df0 Compare July 24, 2026 22:50
@joaoantoniocardoso
joaoantoniocardoso marked this pull request as draft July 24, 2026 22:58
@joaoantoniocardoso
joaoantoniocardoso marked this pull request as ready for review July 24, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

move-to-stable Needs to be cherry-picked and move to stable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant