Skip to content

v0.3.0

Choose a tag to compare

@AMarcinkiewicz AMarcinkiewicz released this 06 Aug 19:17
· 8 commits to main since this release

About 130 times less work per tick, and a footprint table you can trust.

The scan got much cheaper

The tool checks every two seconds whether a listed program is running. That check used to be a CreateToolhelp32Snapshot walk, which builds a snapshot of every process before anything is compared, so stopping early on a match barely helped. It cost about 3.6 ms a call, and got worse under exactly the conditions that matter: measured during a Counter Strike 2 session it rose to 5.6 ms typical and 7.2 ms worst.

It now asks EnumProcesses for the process ids, about 20 us, and remembers each id's executable name, because that never changes. A steady state tick is one syscall plus a few hash lookups.

Approach Typical Worst
Toolhelp snapshot, before 3603 us 6695 us
EnumProcesses plus a name cache, now 27 us 67 us

In the running app that took process CPU from 0.14 percent of one core to 0.01 percent, and the working set now stays under 1 MB instead of growing to 5.9 MB.

The footprint table was wrong, and now is not

Every row that mattered has been remeasured. CPU was listed as 0 percent when it was measurable. The working set was listed as under 1 MB, which was true only for an instant after the startup trim. The executable was listed at 0.46 MB when it was 0.50 MB. The README now shows real numbers and says how they were taken, including the fact that Windows accounts process CPU in steps of about 15.6 ms, so per scan figures come from timing the function directly rather than from division.

Model O2 Pro 4K

Glorious CORE's own device table lists the Model O2 Pro 4K as the same kind of device as the D2 Pro 4K, on the same vendor collection, with the same feature flags, at receiver id 258A:2035 against the D2 Pro's 258A:2036. Since that D2 Pro id matches what was captured for this tool independently, the rest of the row is worth trusting.

If you have one, a protocol.toml next to the executable containing one line should do it:

pid = 0x2035

Every field you leave out keeps its built in value, so the captured rate commands carry over. This has not been tested on real hardware. An issue saying whether it worked either way would be welcome.

Fixes

  • --list produced no output at all. The single instance guard returned before the flag was handled, so it did nothing whenever the tray copy was running, which is the normal case. It now runs first and writes devices.txt next to the executable, since this is a windowed binary with no console and stdout goes nowhere.
  • CAPTURE.md claimed a protocol.toml replaces the built in protocol entirely. It does not, and believing it would have cost a Model O2 Pro owner a pointless capture session.
  • Added the tray icon in both states and the change notification to the README images.

Upgrading

Replace the exe. Nothing about your processlist.cfg or settings.toml changes.