Reputation: 17671
So I have a mysterious issue where after I've added SpellCheck.IsEnabled
to one of my controls the form that hosts this control takes upwards of 3 seconds to load. Remove the spell check attribute and the form loads instantly.
Just for reference, the following is the only place changed in the form:
<TextBox TextWrapping="Wrap" Height="100"
Text="{Binding ActivePostMetadata.Abstract}" SpellCheck.IsEnabled="True"
IsEnabled="{Binding IsAbstractVisible}"
/>
With SpellCheck.IsEnabled="True"
the form's InitializeLayout takes ~3 seconds, without it the initialization is instant.
To make things even more odd: It happens only on my dev machine. When running the compiled application on another machine there's no problem with the form popping up instantly.
I suspect it has to do with a possible Windows issue of finding dictionaries, but I have no idea where to look.
Any ideas what could be going on here?
Upvotes: 1
Views: 848
Reputation: 17671
Ok, after a bit more research it looks like the problem is due to many temporary dictionary files registered here:
HKCU\SOFTWARE\Microsoft\Spelling\Dictionaries
I had about 20 dictionaries registered in tmpFiles
many of which don't exist. tmpFiles has a lot of files in it and likely the file lookup along with the 2 or 3 dictionaries there that are actually available caused the slow down. Not sure what's dumping temporary dictionaries there, but I removed all the temporary files from the listing (leaving in my case just the Word dictionary) and now the form loads quickly again.
More info on where dictionary info comes from and what ultimately let me find this comes from here:
https://msdn.microsoft.com/en-us/library/windows/desktop/hh869748(v=vs.85).aspx
Upvotes: 1