Hook Timing Question

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
KB3MOW
New User
Posts: 9
Joined: Sun Oct 22, 2017 9:52 pm

Hook Timing Question

Post by KB3MOW »

XMBC Version: 2.19.2
Windows Version: 10 Home 21H1
Mouse Information (brand/model): Logitech M570
Relevant Computer Information (CPU, RAM etc): Intel i5 2400 quad core 16G RAM
Did the problem occur after an upgrade of XMBC? (If so, from what version?): No
Did the problem occur after a Windows update/upgrade? (If so, from what version?): No
How long have you used XMBC?: > 1yr
What language and keyboard layout do you use in Windows?: Emglish/QWERTY

Clear description of the problem - try and include as much information as possible, including what button and mappings you are having problems with (if applicable).:

Not a problem as such, but a question. I frequently see entries in the Control Log such as

"The lock for 'CCursors::DestroyCursors' took 1328ms to release"
"The lock for 'HookThread Init' took 1469ms to release!"

Often these numbers are lower, but mostly they're this high or even higher. I had increased
the "Hook Timeout" to 1200, but not sure if increasing it any further is necessary.

I realize that 1328 ms is still a very small interval of time and I'm not seeing any effect at all on
the program.

Thanks
Dave
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Hook Timing Question

Post by phil »

OK those two messages are not related to the hook timeout setting... The hook timeout setting is how long Windows itself gives the hook message handler t execute before giving up (and uninstalling the hook - at which point XMBC would stop responding to mouse messages because Windows no longer calls it).

They are "debug" type messages that tell me something took longer than one second to do (which is unusual but not important if it finishes OK and you don't noticed.

DestroyCursors is related to the mouse cursor (and changing it with layers/chording/button held). Usually this is called when shutting down or maybe changing layers/button chording/button held actions.

And the lock on the hook timeout thread would suggest a mapping is taking a bit longer than expected to perform - this can happen with long simulated keystrokes for example, or anything that is a little more demanding - and while the thread is locked, other things (in XMBC) have to wait, so it might cause some noticeable issues/lag sometimes - but not always - it depends what else is going on!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
KB3MOW
New User
Posts: 9
Joined: Sun Oct 22, 2017 9:52 pm

Re: Hook Timing Question

Post by KB3MOW »

Wow! Quick reply time! Thanks, Phil!
This question was prompted by someone else's post about log size growing over time. I looked into mine, and while not huge, it was indeed growing. I was concerned that by increasing the Hook Timeout I might do more damage than good! I don't use and long or convoluted commands. Almost all are simple CTRL/F6 type. Don't have the knowledge or skill to do much more! The PC is 11 years old, so that may explain things taking longer. I'm 73 and takes me a LOT longer to do many things!!

Thanks again!
Dave
Post Reply