UGTS Document #33 - Last Modified: 8/29/2015 3:23 PM
CTFMON.exe and Slowdowns

In rare cases the Microsoft Office speech and handwriting recognition 'Alternative User Input' component CTFMON.exe can cause slowdowns on Windows XP machines. CTFMON.exe monitors all active windows for input to perform processing on that input for Microsoft Office 2002 and 2003, and runs all the time in the background waiting and watching for input.  It also appears to be installed with Internet Explorer 8, and by any application that uses WPF (such as Visual Studio 2010 or some .NET applications), but it doesn't appear to be used by higher versions of Office (2007+) or IE9. 

The slowdown will happen if there is a process whose main UI thread has impersonated another user.  CTFMON will send window messages to that program, but they will pile up and will be handled extremely slowly (possibly due to context switching), and the UI for that program will appear to hang and take almost minutes to respond.

If this is happening, you will be able to see an immediate return in responsiveness if you terminate the CTFMON.exe process.

To solve the problem permanently, the program which is doing the impersonation should be redesigned to do impersonation on a different thread than the main UI thread, or to impersonate as needed only, and then immediately undo impersonation when the immediate need has passed. It is not a recommended design practice to leave impersonation on indefinitely on the main UI thread of an application.

If the program cannot be redesigned because you did not write it, then CTFMON can be disabled in Office XP or in Office 2003 by disabling the component of MS Office which uses it.

However, if Microsoft's instructions to disable CTFMON seem overly difficult, UGTS can recommend to you a one-liner which works much better:  just set the ACLs on C:\Windows\System32\CTFMON.exe to Deny access to all users.  This both prevents it from being run, and from being replaced with a working version.  This hack can be applied manually to a single system, or by GPO to a set of computers as needed.  Doing this won't stop any currently running CTFMON processes from running, but it will prevent new ones from starting.

Note also that some users have noted that disabling CTFMON can speed up Visual Studio 2005, 2008, and 2010 considerably in regards to the WPF designer, the properties window, and various other dockable windows in VS. This appears to due to CTFMON overwhelming VS with window messages because of the complexity of VS's window structure.

SUMMARY: If you're not using the 'Alternative User Input' feature of Office 2002/2003, disabling it is highly recommended. The kinds of problems noted here with CTFMON will only get worse as the user interfaces of the other programs on your computer systems become more complex.