we are facing a huge performance hit caused by MCH. Our customer reports massive 350% slowdown when listing some of the data inside one of their private app. This app loads wldp.dll a few thousand times.
We traced the issue and it points into MCH CheckHooks. We are hooking about 100 windows APIs. We are using MCH v3.1.13.
I wrote a simple test app looking like this:
Code: Select all
DWORD dwTickCount = GetTickCount();
for (int i = 0; i < 10000; ++i)
{
HMODULE hMod = LoadLibraryW(L"wldp.dll");
if (hMod)
FreeLibrary(hMod);
if (i % 100 == 0)
printf("%u: %u\n", i, GetTickCount() - dwTickCount);
}
Is there a way to lower the amout the CheckHooks fcn is called (it is called on every load/unload) or the lower the time the CheckHooks fcn consume (it always enumerates all the hooks)?
Thx
PP
EDIT: changed MCH version to .13