DocumentSpellChecker loading several binaries

4 posts, 0 answers
  1. Aaron
    Aaron avatar
    12 posts
    Member since:
    Mar 2012

    Posted 19 Dec 2012 Link to this post

    When we new up a DocuemntSpellChecker it loads several of our binaries into memory and we don't know why?

    We create one like this:

    DocumentSpellChecker sp = new DocumentSpellChecker();

    As soon as we hit that code all of the binaries that are using a control with a DocumentSpellChecker are loaded into memory. This causes problems because we do a check on those binaries later in the app when we attempt to load a form from them. We check if the binary is up to date and if not replace it. We can't do that, however, because the documentSpellChecker has already loaded them into memory.

    Any ideas?
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 21 Dec 2012 Link to this post

    Hi Aaron,

    Thank you for writing.

    The DocuemntSpellChecker is implemented with MEF to support dynamic loading of different languages and plugins based model. To support this processing the MEF engine loads the assemblies in the application directory and searches for SpellChecker related interfaces implementation to create / load and activete the spell checker system.

    I hope this information is helpful. Feel free to ask if you have any additional questions.

    Kind regards,
    Julian Benkov
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Aaron
    Aaron avatar
    12 posts
    Member since:
    Mar 2012

    Posted 14 Jan 2013 Link to this post

    I see. That is a problematic approach in a modular environment. We don't push all the binaries in our application down to the clients on each launch because it would severely slow the launch sequence. We update binaries for different modules on demand. Using the MEF approach in the DocumnentSpellChecker ties our hands. 

    Is there any known way to prevent all the binaries from loading when a spell checker control is instantiated? I'm guessing no, but never hurts to ask.
  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 16 Jan 2013 Link to this post

    Hi Aaron,

    The DocumenSpellChecker type uses the 
    ImportMany attribute of MEF to populate the DictionaryList and this loads all assemblies in the application to search for 'IWordDictionary' interface implementation. This is by design behavior and in this situation the only suitable workaround for your application is to delay the creation of the DocumentSpellChecker instance in your application.

    Do not hesitate to contact us if you have further questions or issues.

    All the best,
    Julian Benkov
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top