Skip to content

fix: cache WLAN handle in network provider#263

Open
johnsideserf wants to merge 1 commit intoglzr-io:mainfrom
johnsideserf:fix/cache-wlan-handle
Open

fix: cache WLAN handle in network provider#263
johnsideserf wants to merge 1 commit intoglzr-io:mainfrom
johnsideserf:fix/cache-wlan-handle

Conversation

@johnsideserf
Copy link
Copy Markdown
Contributor

@johnsideserf johnsideserf commented Mar 13, 2026

Summary

  • Cache the WlanOpenHandle in a WlanMonitor struct that opens it once and reuses it for all subsequent WiFi SSID/signal queries
  • Previously, WlanOpenHandle/WlanCloseHandle was called on every network poll interval, creating and destroying OS WLAN handles thousands of times per hour

Split out from #262 per maintainer request.

Related: #261

Context

The repeated WLAN handle cycling causes kernel-side resource fragmentation in the Windows WiFi subsystem over extended uptime (12+ hours), contributing to progressive system stutter.

Test plan

  • Verify WiFi SSID and signal strength still reported correctly
  • Run Zebar with network provider for extended period, confirm no degradation

🤖 Generated with Claude Code

WlanOpenHandle was called on every network poll interval,
creating and destroying OS WLAN handles thousands of times
per hour. Cache the handle in a WlanMonitor struct that
opens it once and reuses it for all subsequent WiFi queries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-project-automation github-project-automation bot moved this to 📬 Needs triage in zebar Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📬 Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant