1

This message is shown on startup on Outlook 2013 for an Outlook AddIn developed using .Net 3.5. I have tried the suggestions in this post: This addin caused outlook to start slowly But without any luck. This is my initial method:

private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        _Explorers = this.Application.Explorers;
        _Inspectors = this.Application.Inspectors;
        _Explorers.Application.NewMailEx += new Outlook.ApplicationEvents_11_NewMailExEventHandler(Application_ItemReceive);
        _Explorers.Application.Reminders.ReminderFire += new Outlook.ReminderCollectionEvents_ReminderFireEventHandler(Application_ReminderFire);
        outlookNamespace = this.Application.GetNamespace("MAPI");
    }
Rafael
  • 1,099
  • 5
  • 23
  • 47

1 Answers1

1

Accessing the windows registry is a time-consuming task which you can run on another thread. You should move such stuff to another thread to prevent your add-in from disabling. See Performance criteria for keeping add-ins enabled which states the following:

Extending the add-in resiliency pillar of Outlook 2010, Outlook 2013 monitors add-in performance metrics such as add-in startup, shutdown, folder switch, item open, and invoke frequency. Outlook records the elapsed time in milliseconds for each performance monitoring metric.

For example, the startup metric measures the time required by each connected add-in during Outlook startup. Outlook then computes the median startup time over 5 successive iterations. If the median startup time exceeds 1000 milliseconds (1 second), then Outlook disables the add-in and displays a notification to the user that an add-in has been disabled. The user has the option of always enabling the add-in, in which case Outlook will not disable the add-in even if the add-in exceeds the 1000 millisecond performance threshold.

Community
  • 1
  • 1
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • I get the same result without the registry task, I don't know where the time is being spent – Rafael Jan 06 '15 at 16:22
  • Did you try to test a newly created empty add-in project? Do you get the same results? – Eugene Astafiev Jan 06 '15 at 16:34
  • When executing a newly created empty add-in project it doesn't add it to the list of slow addins, the error doesn't appear – Rafael Jan 07 '15 at 09:23
  • It confirms my assumption that the issue depends on your code. Try to comment the code, uncommenting line-by-line you will find a weak place. Note, loading referenced libraries also takes some time. – Eugene Astafiev Jan 08 '15 at 06:50
  • Try to comment all the code, not only in the Startup event handler. Also take a look at the referenced assemblies. – Eugene Astafiev Jan 09 '15 at 15:25