Page 1 of 1

slow startup time on server because of many HKCR lookups

Posted: Wed 23 Nov, 2016 11:19
by ultramage
On one Server 2008 machine, I installed the latest stable Far30b4774.x64.20160902.msi.
Here, Far takes an unusually long time to start up (3 seconds), every time. Process Monitor shows that it loads its db files for 400ms, then proceeds to hammer HKCR\CLSID, HKCU\Software\Classes\CLSID and HKCR\Interface for 2500ms.
After downloading the pdb, the Stack view shows the following stack trace:

Code: Select all

...
13	shdocvw.dll	Ordinal153 + 0x2a3d
...
16	ntdll.dll	LdrLoadDll + 0x15e
17	kernel32.dll	FindResourceExW + 0x151
...
34	ole32.dll	CoCreateInstance + 0x17b
35	Far.exe	taskbar::taskbar + 0x50, c:\src\unicode_far\taskbar.cpp(48)
36	Far.exe	Taskbar + 0x46, c:\src\unicode_far\taskbar.cpp(41)
37	Far.exe	PluginManager::LoadPlugins + 0x49, c:\src\unicode_far\plugins.cpp(393)
38	Far.exe	ControlObject::Init + 0x19c, c:\src\unicode_far\ctrlobj.cpp(92)
39	Far.exe	MainProcess + 0x2c1, c:\src\unicode_far\main.cpp(219)
40	Far.exe	mainImpl + 0x1183, c:\src\unicode_far\main.cpp(767)
41	Far.exe	wmain_seh + 0xa0, c:\src\unicode_far\main.cpp(797)
The windows dlls are either stripped or unavailable, so the names there cannot be trusted. But at least I know that the corresponding line is:

Code: Select all

CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, IID_PPV_ARGS_Helper(&ptr_setter(mTaskbarList)));
On my win7 pc it only scans 1-2 subtrees of CLSID and takes only 1ms to complete.

slow startup time on server because of many HKCR lookups

Posted: Thu 24 Nov, 2016 18:11
by HaRT
ultramage wrote: then proceeds to hammer HKCR\CLSID, HKCU\Software\Classes\CLSID and HKCR\Interface for 2500ms
Try starting FAR without plugins (with /p). If that's fast, I would try loading with the EMenu alone (far /p"%FARHOME%\Plugins\EMenu").

slow startup time on server because of many HKCR lookups

Posted: Thu 24 Nov, 2016 18:26
by ultramage
Mhm, it's either the same or slightly faster. But nowhere near the instanteous startup that I get on other PCs.

slow startup time on server because of many HKCR lookups

Posted: Thu 24 Nov, 2016 19:25
by 2useven10
ultramage, what about older far versions?

Add:
And why do you think far is the reason?
Maybe that is your server specific (explorer extensions or whatever else).
Can anybody confirm 2008 server problem?

slow startup time on server because of many HKCR lookups

Posted: Thu 24 Nov, 2016 21:28
by ultramage
Yeah it's possible that third-party explorer extensions are jamming up the works. I'm asking here because I'm not sure how to proceed in diagnosing this. Maybe someone knows. Also, the whole taskbar thing originates from far code. If the only thing Taskbar does is drawing the fancy green progress bar overlay when in aero mode, then I could do without that, since that feature does not exist in classic mode. But I couldn't find any toggle for that. I don't mind waiting 3 seconds as much, and I'll eventually decommission this server. I just thought that there might be something useful in reporting this.