none
Outlook detected an add-in problem RRS feed

  • Question

  • Hi,

    In Outlook 2013, it warns that my add-in has performance issue when I start Outlook

    Here is the message:

    These add-ins decreased performance or caused Outlook to crash.

    This add-in caseud Outlook to start slowly.
    1.29 seconds.

    The add-in doesn't start until user click the region button to call the "FormRegionShowing"
    Also, I don't have any code in the Startup() or Shutdown(). It's empty.

        Private Sub ThisAddIn_Startup() Handles Me.Startup

        End Sub

        Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown

        End Sub


    Is there any way to know what does it mean slowly?

    I would like to know what it means slow and which part is slow so that I can improve it.

    Thanks

    Cowcow


    Saturday, August 9, 2014 3:24 AM

Answers

  • The Debug configuration is not optimized and contains additional symbols and IL commands for debugging. But Outlook checks the performance anyway, it doesn't matter what configuration you are using.
    • Edited by Eugene Astafiev Tuesday, August 12, 2014 12:35 PM
    • Marked as answer by cowcow222 Wednesday, August 13, 2014 12:37 AM
    Tuesday, August 12, 2014 12:35 PM
  • Outlook averages 5 startups to see if that metric is too slow. You have wildly different startup times depending on whether the Framework needs to be started, among other factors. Outlook uses the average of the 5 startups to determine whether to disable the addin or not.

    The startup times are entered into the Application event log. You can view the startup times there and see how your code is doing.


    Ken Slovak MVP - Outlook

    • Marked as answer by cowcow222 Wednesday, August 13, 2014 12:37 AM
    Tuesday, August 12, 2014 1:27 PM
    Moderator
  • I have already mentioned that in my first post.
    • Marked as answer by cowcow222 Wednesday, August 13, 2014 12:37 AM
    Tuesday, August 12, 2014 1:33 PM

All replies

  • Hello Cowcow,

    > Is there any way to know what does it mean slowly?

    You can read about the time threshold in the What's new for Outlook 2013 developers article in MSDN. See the Performance criteria for keeping add-ins enabled section 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

    >The add-in doesn't start until user click the region button to call the "FormRegionShowing"  

    If so, you will not see the button. You are on wrong avenue. The is started for displaying the button to call the function mentioned.

    Did you try to measure how much time is required for the add-in ctor and initializing static variables?

    I'd suggest adding trace statements (for example, you can use Debug.WriteLine) and see what method of functions takes much time.

    Saturday, August 9, 2014 7:34 AM
  • Hi,

    is it VSTO? what is the loadbehavior value?

    Monday, August 11, 2014 10:35 AM
  • In cases where the Framework is being started for the addin the code that does that cannot be traced in debug mode. Starting up the managed code Framework will usually cause the addin to exceed the startup time requirements, and there's nothing much you can do about it.

    In theory the Warmup registry key for VSTO addins should prevent that from happening. It should exclude your VSTO addin from being timed for Framework startups. However, it's buggy and doesn't work as documented. I have a bug open on that.

    Because you cannot exclude the Framework startup time, any JIT compilation of the addin code, the VSTO startup times and other factors not under your control, in many cases the only decent solution is to write the registry key that prevents the addin from being disabled for slow startup.

    See http://msdn.microsoft.com/en-us/library/office/jj228679(v=office.15).aspx#ol15WhatsNew_AddinDisabling for more information.


    Ken Slovak MVP - Outlook

    Monday, August 11, 2014 2:30 PM
    Moderator
  • In that case I'd suggest using the NGEN utility for helping jitter and decreasing the startup time.
    Monday, August 11, 2014 2:45 PM
  • JIT is usually a very minor factor. In tests we've done it's the Framework startup time that's the big problem. The hope is that the VSTO team will fix the Warmup setting bug, that will eliminate the Framework slow startup problem from the equation.

    Ken Slovak MVP - Outlook

    Monday, August 11, 2014 2:50 PM
    Moderator
  • Thank you for all the information provided.

    I ran my AddIn program from VS (in debug mode). In Outlook -> Options, I noted that the debug AddIn was registered (under /bin/debug). 

    I started Outlook (not from VS), and used the AddIn. I started to see the warning.

    In VS, I clean the solution and change to "Release" mode. Then, rebuild the AddIn.

    In Outlook -> Options,  I noted the Released version of AddIn was registered (under /bin/release/). It seems to have resolved the issue. I haven't seen the warning so far.

    I think if I run from VS, Outlook doesn't check the performance. But if I run it outside VS, Outlook will check the startup performance. I think it take longer to load for the debug AddIn :)

    I will keep an eye on it. If it happens again, I will double check those suggestions provided, thanks.

    Cowcow.


    • Edited by cowcow222 Tuesday, August 12, 2014 12:55 AM
    Tuesday, August 12, 2014 12:53 AM
  • The Debug configuration is not optimized and contains additional symbols and IL commands for debugging. But Outlook checks the performance anyway, it doesn't matter what configuration you are using.
    • Edited by Eugene Astafiev Tuesday, August 12, 2014 12:35 PM
    • Marked as answer by cowcow222 Wednesday, August 13, 2014 12:37 AM
    Tuesday, August 12, 2014 12:35 PM
  • Outlook averages 5 startups to see if that metric is too slow. You have wildly different startup times depending on whether the Framework needs to be started, among other factors. Outlook uses the average of the 5 startups to determine whether to disable the addin or not.

    The startup times are entered into the Application event log. You can view the startup times there and see how your code is doing.


    Ken Slovak MVP - Outlook

    • Marked as answer by cowcow222 Wednesday, August 13, 2014 12:37 AM
    Tuesday, August 12, 2014 1:27 PM
    Moderator
  • I have already mentioned that in my first post.
    • Marked as answer by cowcow222 Wednesday, August 13, 2014 12:37 AM
    Tuesday, August 12, 2014 1:33 PM