Page 1 of 1

4+ seconds to display an issue, need to optimize

Posted: 17 Jun 2022, 08:43
by bodtx
Hi, I have some issue with slow page display.
It usually takes 3-4 seconds to display a bug page:

my versions:
  • mantis 2.23.0
    php 7.3.24
    postgres 11.9, PostgreSQL 11.9 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit
number of issues: 10K

typical performance statistics to display an issu

this one has been really long

Code: Select all

Temps d’exécution de la page : 9.3540 secondes     Utilisation de la mémoire : 11,140 Kio     Requêtes exécutées au total : 52     Temps d’exécution total de la requête : 0.0352 secondes
classic time

Code: Select all

Temps d’exécution de la page : 3.1929 secondes     Utilisation de la mémoire : 11,101 Kio     Requêtes exécutées au total : 47     Temps d’exécution total de la requête : 0.0229 secondes

an other one

Code: Select all

Temps d’exécution de la page : 6.2610 secondes     Utilisation de la mémoire : 11,171 Kio     Requêtes exécutées au total : 53     Temps d’exécution total de la requête : 0.0249 secondes

I've optimized my pogstgres with a good amount of mem reading the docs, I think the request are quick
when monitoring with an htop the httpd and postgres process, I do not notice any big usage of cpu / mem either for httpd or postgres.

any idea how I could optimize mantisBT?

thx

Re: 4+ seconds to display an issue, need to optimize

Posted: 17 Jun 2022, 18:42
by atrol
Do you have any 3rd party plugins installed?
Do you have any custom functions activated?
Did you change any original source code of MantisBT?
What's the difference between the slowest and the fastest issue? (more notes, attachments, relationships, ....?)

Re: 4+ seconds to display an issue, need to optimize

Posted: 20 Jun 2022, 07:18
by bodtx
Hi here are the plugins
Screenshot 2022-06-18 at 10-38-08 Gérer les greffons - MantisBT.png
Screenshot 2022-06-18 at 10-38-08 Gérer les greffons - MantisBT.png (51.31 KiB) Viewed 5042 times

did not find any file named "custom_functions_inc.php" so I suppose there is no custom functions.

We did not change the original source code

the response time does not seems linked to the relation complexity of the issue. Sometimes issue with less "comments, changed" is slower than a big one.

thx for your reply

Re: 4+ seconds to display an issue, need to optimize

Posted: 20 Jun 2022, 18:55
by atrol
Do you use LDAP for authentication?

Re: 4+ seconds to display an issue, need to optimize

Posted: 20 Jun 2022, 20:23
by bodtx
Yes

Re: 4+ seconds to display an issue, need to optimize

Posted: 20 Jun 2022, 20:43
by atrol
Have you set $g_use_ldap_realname or $g_use_ldap_email = ON; ?
If yes, try setting the options to OFF;

Re: 4+ seconds to display an issue, need to optimize

Posted: 20 Jun 2022, 20:48
by atrol
If it's faster when setting OFF, then upgrade to latest MantisBT version.
E.g. there are some optimizations in 2.23.1 https://mantisbt.org/bugs/view.php?id=26622

Re: 4+ seconds to display an issue, need to optimize

Posted: 21 Jun 2022, 07:04
by bodtx
Waow impressive, it is now faster than light
Screenshot 2022-06-21 at 09-02-24 0011056 Le libellé Bâtiment est toujours présent dans les messages d'erreur - MantisBT.png
Screenshot 2022-06-21 at 09-02-24 0011056 Le libellé Bâtiment est toujours présent dans les messages d'erreur - MantisBT.png (4.95 KiB) Viewed 4990 times
I have disabled

Code: Select all

$g_use_ldap_email               = OFF;
and it did the tricks.
I've noticed for the next release.

thx so much.

Re: 4+ seconds to display an issue, need to optimize

Posted: 21 Jun 2022, 11:42
by atrol

Code: Select all

$g_use_ldap_email               = OFF;
Keep in mind that this can introduce issues (notifications sent to wrong email address), if the ldap email address is different from the address stored in the MantisBT account database.