CPU usage optimizations - #136
Merged
Merged
Conversation
Replaces the external crate dependency with local code to avoid maintaining a separately published package for such a small, single-consumer library. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Temperatures were always empty because pfSense/OPNsense don't load the coretemp/amdtemp kernel modules by default, so the dev.cpu.N.temperature sysctls sysinfo reads never existed; now best-effort kldload them before polling starts. Disk read/written bytes were always zero on ZFS-rooted boxes (the modern pfSense/OPNsense default) because sysinfo attributes I/O by matching a /dev/... device path, but a ZFS root reports its source as a dataset name instead. Added a FreeBSD-only fallback that resolves the pool backing "/" via zpool status and reads GEOM's raw devstat counters for just its backing disks, avoiding double-counting from the partition/label layers stacked on top of each disk. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… work Replaces the hand-rolled per-platform socket enumeration (netinfo/sock) with the listeners crate, removing unshielded blocking Win32 syscalls on the async executor and a sequential /proc walk. Switches ItemBuffer to VecDeque and restructures the dump-file retransmission loop to avoid O(n^2) front-drains on large backlogs. Moves JSON (de)serialization and fireparse config parsing onto spawn_blocking so large payloads can't stall the shared tokio runtime. Also caches the config digest instead of re-hashing unchanged content each tick, parallelizes per-socket HTTP/SSH service probing, fixes a short-circuit bug in sysconfig's update_all, and trims a couple of small per-tick allocations in FreeBSD disk-IO and resource monitoring. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
for_kv_map (iterate lock.values() instead of (_, v) in lock.iter()) and needless_borrow in wallguard-server, plus collapsible_if in the FreeBSD-only GEOM label-mapping parser (invisible to clippy on non-FreeBSD hosts). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.