Page 1 of 1

Hook Timing Question

Posted: Wed Nov 10, 2021 6:59 pm
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

Re: Hook Timing Question

Posted: Wed Nov 10, 2021 7:15 pm
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!

Re: Hook Timing Question

Posted: Wed Nov 10, 2021 7:28 pm
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