Performance issue when creating/modifying bug

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
gbe
Posts: 5
Joined: 29 Oct 2014, 14:44

Performance issue when creating/modifying bug

Post by gbe »

Hello,

We''ve just set up a gmail account (POP3) and tested the emailreporting. Bug are correctly created but we are facing performance problem.
Indeed, when we trigger the collection of email (/mantis/plugins/EmailReporting/scripts/bug_report_mail.php) it last more than 20 seconds and block any other usage of mantisBT...

This issue is only relevant when there is at least one email to collect on our gmail account.

Any idea to fix this problem ?
----------------------------------------------------------------------------------------------
for your information, here is the trace for one example of our tests :

"Start checking all mailboxes: Wednesday 29th of October 2014 14:01:27

Debug output memory usage
Location: Mail API - Finished __construct
Current memory usage: 10.51 MiB / -1
Peak memory usage: 10.53 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1



Debug output memory usage
Location: Mail API - Start process mailbox
Current memory usage: 10.51 MiB / -1
Peak memory usage: 10.53 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1


Debug output memory usage
Location: Mail API - Start process single email
Current memory usage: 10.52 MiB / -1
Peak memory usage: 10.54 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail API - Single email retrieved from mailbox
Current memory usage: 10.53 MiB / -1
Peak memory usage: 10.55 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail API - Start Mail Parser
Current memory usage: 10.53 MiB / -1
Peak memory usage: 10.55 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail Parser - Start parse
Current memory usage: 10.55 MiB / -1
Peak memory usage: 10.59 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail Parser - mimeDecode initiated
Current memory usage: 10.55 MiB / -1
Peak memory usage: 10.59 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail Parser - Start decode
Current memory usage: 10.55 MiB / -1
Peak memory usage: 10.59 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail Parser - Start parse structure
Current memory usage: 10.56 MiB / -1
Peak memory usage: 10.62 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail API - Finished Mail Parser
Current memory usage: 10.55 MiB / -1
Peak memory usage: 10.62 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail API - Parsed single email
Current memory usage: 10.53 MiB / -1
Peak memory usage: 10.62 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1
Debug output memory usage
Location: Mail API - Start add bug
Current memory usage: 10.58 MiB / -1
Peak memory usage: 10.63 MiB / -1
Current real memory usage: 10.75 MiB / -1
Peak real memory usage: 10.75 MiB / -1


Mailbox: Test_GBE
Debug output memory usage
Location: Mail API - Finished add bug
Current memory usage: 10.82 MiB / -1
Peak memory usage: 11.09 MiB / -1
Current real memory usage: 11.25 MiB / -1
Peak real memory usage: 11.5 MiB / -1
Debug output memory usage
Location: Mail API - Start processing attachments
Current memory usage: 10.82 MiB / -1
Peak memory usage: 11.09 MiB / -1
Current real memory usage: 11.25 MiB / -1
Peak real memory usage: 11.5 MiB / -1
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Performance issue when creating/modifying bug

Post by SL-Gundam »

How do you execute the script? through the command line or a web browser?
gbe
Posts: 5
Joined: 29 Oct 2014, 14:44

Re: Performance issue when creating/modifying bug

Post by gbe »

I click on the link available on the configuration page (/mantis/plugins/EmailReporting/scripts/bug_report_mail.php)
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Performance issue when creating/modifying bug

Post by SL-Gundam »

The only thing i know is that PHP on Windows in threaded SAPI mode seems to have an issue sometimes where the scripts will finish in order even if the latter script should have finished sooner. I don't see any way in which EmailReporting itself could cause this

The reason the execution of EmailReporting's script thats longer then normal might be the connection with the mail server which might be slow
gbe
Posts: 5
Joined: 29 Oct 2014, 14:44

Re: Performance issue when creating/modifying bug

Post by gbe »

It does not come from the connection to the server as when here is n email to analyse, the job is really fast.
It is only long when there is at least one email to deal with (more than 30 seconds for one email...)
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Performance issue when creating/modifying bug

Post by SL-Gundam »

So far there have not been any performance issues with EmailReporting. So if i can't reproduce it, i cannot fix it.

So that leaves 2 options:
- you debug EmailReporting and find the problem and post it here so that i can check it out further
- I debug EmailReporting on your server and find the problem.
gbe
Posts: 5
Joined: 29 Oct 2014, 14:44

Re: Performance issue when creating/modifying bug

Post by gbe »

Ok
We try to debug Email Reporting and I let you know.
Thanks
gbe
Posts: 5
Joined: 29 Oct 2014, 14:44

Re: Performance issue when creating/modifying bug

Post by gbe »

We found that the performance issue is in the Mantisbt standard and is not relevant to EmailReporting.
Thanks for your help !
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Performance issue when creating/modifying bug

Post by SL-Gundam »

Ok thanks for checking.
Post Reply