OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
686 stars 95 forks source link

Addin OnSend (ItemSend) sometimes it takes a long time to run (more than 30 seconds). #4647

Closed guzman-rc closed 3 months ago

guzman-rc commented 4 months ago

We have developed an addin that removes metadata from attachments, this addin has been working for several years but lately some users complain that the addin takes a long time to run, even when the email has no attachments.

Your Environment

Expected behavior

The Addin, in normal conditions takes 1 second to process each attachment, when the email does not contain attachments it should not take any time because it does not perform any process.

Current behavior

Users are complaining about the time it takes for the addin to run.

Useful logs

Attached is a screenshot displaying that the email contains no attachments and the Addin message appears: MetaClean for Outlook 365 está trabajando en su solicitud.

Captura

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

rkpathak commented 4 months ago

@guzman-rc In our experiments event handlers get called right away. As handler could be doing multiple operations, can you zero in further and let us know which particular API that is causing delay?

guzman-rc commented 4 months ago

I am using:

https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/outlook-on-send-addins?tabs=classic

guzman-rc commented 4 months ago

<Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="itemSendHandler" />

rkpathak commented 4 months ago

@guzman-rc Can you share a small addin with code, using which we could reproduce this issue?

guzman-rc commented 4 months ago

The delay is produced randomly.

kumarshrey-msft commented 3 months ago

Hi @guzman-rc, there can be multiple reasons behind the intermittent delays, for instance the connection to the actual add-in might be slow, can you repro this even if the add-in is hosted on localhost? Using tools like Fiddler, is it possible for you to narrow down the reason behind this slowness? We have been unable to repro this at our end so far.

guzman-rc commented 3 months ago

We will try to do what you propose and I will respond with the results.

microsoft-github-policy-service[bot] commented 3 months ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

microsoft-github-policy-service[bot] commented 3 months ago

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.