Only search projects.blender.org
Log In
New Account
Home
My Page
Projects
Blender 2.x BF release
Summary
Activity
Tracker
SCM
Files
Blender 2.6 Bug Tracker: Browse
[#26328] Blender uses global keyboard message hook which hurts system responsiveness on Windows
Date:
2011-03-04 21:53
Priority:
3
State:
Closed
Submitted by:
David Finch (
dtfinch
)
Assigned to:
Nathan Letwory (jesterking)
Category:
OS related: Windows
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
Summary:
Blender uses global keyboard message hook which hurts system responsiveness on Windows
Detailed description
With Blender 2.56, and probably earlier, when doing a batch render in the background, I've found that my entire system frequently becomes unresponsive to keyboard input (nothing else is affected) for several seconds at a time. It makes it hard to stay productive during long renders.
I believe the cause to be the use of a global message hook (SetWindowsHookEx in /intern/ghost/intern/GHOST_SystemWin32.cpp). Every keyboard message in every application running has to pass through Blender's message hook, and so whenever Blender is busy, the system is unresponsive to the keyboard. Microsoft recommends that SetWindowsHookEx be used for debugging-only because of its severe impact on system responsiveness.
It looks like the hook is only used to update an array of which keys are currently pressed down. Windows has a GetAsyncKeyState function to provide this information, so the global message hook is completely unnecessary.
Followup
Message
Date
: 2011-03-05 14:43
Sender
:
Nathan Letwory
Assigning to myself.
Date
: 2011-03-06 16:13
Sender
:
Alexander Kuznetsov
Nathan Letwory, I commented out/deleted hooks and other stuff in new patch because we don't need them any more [26364]
Date
: 2011-03-08 13:49
Sender
:
Nathan Letwory
I'll leave this one open until your patch has been fully approved and committed.
Date
: 2011-03-09 23:14
Sender
:
Nathan Letwory
Alexander's patch, committed in r35437 fixes this nicely by completely removing the hooks :)
Attached Files:
No Files Currently Attached
Changes:
Field
Old Value
Date
By
status_id
Open
2011-03-09 23:14
jesterking
close_date
None
2011-03-09 23:14
jesterking
Status
New
2011-03-09 23:14
jesterking
assigned_to
none
2011-03-05 14:43
jesterking