Skip to content

Remove redundant scan triggered on every menu popover open - #6

Open
AadhilFarhan wants to merge 1 commit into
mainfrom
fix/redundant-menu-scan
Open

Remove redundant scan triggered on every menu popover open#6
AadhilFarhan wants to merge 1 commit into
mainfrom
fix/redundant-menu-scan

Conversation

@AadhilFarhan

Copy link
Copy Markdown
Owner

What

MenuContent's .task { await model.refresh() } fired an extra PortScanner.scan() (spawning lsof/ps subprocesses) every time the popover's content view appeared — i.e. every click on the menu-bar icon — on top of AppModel's already-running 3-second poll loop, which starts immediately in init() before any menu has ever been opened. The popover's data is already at most 3s stale without the extra call.

Test plan

  • Build succeeds.
  • Sanity-launched the app, confirmed it stays alive and populates without the menu-triggered scan (the background poll loop covers it).
  • Full suite: 9/9 passing (unaffected by this change, hygiene check).

MenuContent's .task { await model.refresh() } duplicated AppModel's
already-running 3s poll loop (started immediately in init(), before
any menu has ever been opened), so every click on the menu-bar icon
spawned an extra round of lsof/ps subprocesses on top of the
background poll. The popover's data is already at most 3s stale
without it.
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.

1 participant