Author Topic: Occasional (but heavy) lags in cursor movement  (Read 2251 times)

Astan

  • Newbie
  • *
  • Posts: 22
Occasional (but heavy) lags in cursor movement
« on: December 25, 2023, 09:32:23 AM »
I've been experiencing an issue, which happened several times by now, when my in-game view rotation with mouse was leapfrogging, and the issue went away as soon as I closed VoiceAttack. I am running VoiceAttack v1.10.6 (the latest at the time of writing), without any plugins.

It looks like these slowdowns in mouse cursor movement tend to happen, albeit just for several seconds, when saving (with "Apply" or "Done") the commands list / Profile in VoiceAttack, as well as when saving an individual command (which seems to happen at random, and not with any specific commands). I have (relatively) few commands in my main profile, below 900 (4500 derived commands). I think I didn't have any commands running in the background when this issue happened in-game (bar a possible condition checking on an infinite loop which I neatly bugged myself, but that was just once).

Oddly, this also happens when pressing and holding Ctrl+C, particularly in any of VoiceAttack's windows (which I started doing because of things not getting copied properly). However, this also tends to happen outside of VoiceAttack, but when VoiceAttack is running, and the window "Edit a Profile" is open.

I first experienced this issue months ago (2022-2023) on Windows 10, and continue to experience them on Windows 11. I wasn't able to work this out so far. Some suggested that it might have more to do with Windows Speech Recognition than VoiceAttack, but I wouldn't even know how to start diagnosing this. Would you have any advice for me?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Occasional (but heavy) lags in cursor movement
« Reply #1 on: December 25, 2023, 09:38:57 AM »
Speech recognition can be turned off by checking the "Disable Speech Recognition" option on the "Recognition" tab of the VoiceAttack options window, if you'd like to rule that out.


The cursor stuttering for a few seconds under certain conditions (E.G. startup, saving things) did happen on my previous machine, which was over ten years old.
What kind of hardware are you running?

Do you have any other software that might attempt to intercept keypresses or perhaps interact with/manage the clipboard?

Astan

  • Newbie
  • *
  • Posts: 22
Re: Occasional (but heavy) lags in cursor movement
« Reply #2 on: December 25, 2023, 10:27:20 AM »
I will try disabling Speech Recognition, with the option you pointed out, thank you.

My system is built on the i7-8700K. The GPU and RAM are pretty recent, with the latter permanently overclocked (but I think this is a common case).

I do run other software that can intercept keypresses (or mouse input) and manage the clipboard, aside from the default Windows (Multi-)Clipboard: AutoHotKey (usually small key remap scripts only), and Stream Deck (occasionally, depending on what is running on it). I will try excluding them from use, for time being. It will take me some time (at least some three weeks) to test all of these cases thoroughly, so I'll come back later with what I could find out.

Would you have any thoughts on the provided system specs, or any potential software conflicts in that regard?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Occasional (but heavy) lags in cursor movement
« Reply #3 on: December 25, 2023, 10:34:34 AM »
It's not ancient, but it is over five years old, and it'll be less performant now than new due to security "fixes" (E.G. for Spectre and Meltdown)

The stuttering on saving could be due to that, but the stuttering while holding Ctrl-C perhaps less likely so.

Astan

  • Newbie
  • *
  • Posts: 22
Re: Occasional (but heavy) lags in cursor movement
« Reply #4 on: January 26, 2024, 06:55:46 AM »
Here's what I was able to find out, in my testing:
  • there don't seem to be any software conflicts between VoiceAttack and AutoHotKey or Elgato Stream Deck,
  • copying stuff to clipboard with Ctrl+C (which sometimes doesn't work, but I didn't observe it causing stuttering) is a separate, minor issue with Windows Clipboard,
  • disabling Speech Recognition in VoiceAttack (it was not running in my system otherwise) makes all the difference, minimizing stuttering when saving commands in VoiceAttack, and preventing the mentioned occasional (but heavy) lag in cursor movement (which persists until VoiceAttack / Speech Recognition is restarted).

I cannot pinpoint the root cause of this, but the cursor lag doesn't occur frequently, and the stutter on saving only happens for a second or two; the first issue is easily fixed (by restarting VoiceAttack or, again, temporarily disabling Speech Recognition in Options), and the second issue is very brief and not impactful, so I guess I'll just have to live with it. Thanks again for your input.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Occasional (but heavy) lags in cursor movement
« Reply #5 on: January 26, 2024, 07:08:46 AM »
Did you upgrade from Windows 10 to Windows 11, or was it a clean install?

Given that disabling speech recognition has a noticeable effect, it's worth trying the steps in this topic

Astan

  • Newbie
  • *
  • Posts: 22
Re: Occasional (but heavy) lags in cursor movement
« Reply #6 on: January 27, 2024, 12:18:08 PM »
Oh, thank you, I did try resetting Speech Recognition. Twice already, however, and on both systems (and with two microphones). That was a clean install of Windows… 10, upgraded to 11 right afterwards (if that makes any difference).

The issues that I observed are CPU-bound, and the CPU usage graphs (when some of those issues occur) tend to resemble those of a memory leak. On the other hand, I saw no such pattern in the memory usage graph.

Unless Speech Recognition is disabled, I'm using VoiceAttack in open listening mode, and I think there might be some correlation between all that and the program regularly entering sleep mode, then waking up from it.

That's virtually all I could gather on this matter at this point.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Occasional (but heavy) lags in cursor movement
« Reply #7 on: January 27, 2024, 01:11:00 PM »
What are you referring to by "the program regularly entering sleep mode, then waking up from it"?

Do you have the "Enable Sleep Mode after X seconds of no audio activity" option on the "System / Advanced" tab of the VoiceAttack options window enabled?


It would make sense for that to cause a CPU usage spike, as the speech recognition system is essentially stopping and starting

Astan

  • Newbie
  • *
  • Posts: 22
Re: Occasional (but heavy) lags in cursor movement
« Reply #8 on: February 03, 2024, 04:04:42 AM »
Yes, thank you, that's exactly what I meant. I toggled on "Enable Sleep Mode after 900 seconds of no audio activity" a while back.

However, the issues I described also happened, a couple of times, when I was in an online meeting (so when those Sleep Mode settings didn't apply).

My main concern is still not the CPU usage spikes, causing minor and temporary lags (although these happen much more frequently), but the leapfrogging cursor movement which, even if occurring rarely, persists until I restart VoiceAttack.

Astan

  • Newbie
  • *
  • Posts: 22
Re: Occasional (but heavy) lags in cursor movement
« Reply #9 on: February 06, 2024, 09:34:47 AM »
New data: I clearly saw now that the leapfrogging cursor issue occurred soon after I woke up the PC from the screen saver and right after VoiceAttack switched Voice Recognition back on from sleep mode, with the log entry "Exiting sleep mode.  Voice recognition enabled."
Once again, the issue persisted, and disappeared as soon as I closed VoiceAttack.