REST API diagnostic headers and optimizations
-
X-Mantis-QueriesCount- always include whenshow_queries_countis enabled. -
X-Mantis-Queries- show whenshow_queries_countis enabled,log_levelincludesLOG_DATABASE, and current user is administrator.
I have done some comparison before/after the changes with the database on localhost and got the following results. Note that the results are very much dependent on the data shape.
For each row I included the query count and the execution time for 3 runs.
Before:
Get Projects - 116 (0.6657, 0.6994, 0.6170)
Get Project - 40 (0.5066, 0.5214, 0.5049)
Get Issues - 150 (1.8761, 1.4054, 1.4367)
Get Issue - 43 (0.5797, 0.5856, 0.6125)
After
Get Projects - 59 (0.4943, 0.5514, 0.4816)
Get Project - 21 (0.4330, 0.4843, 0.4765)
Get Issues - 140 (1.5547, 1.3804, 1.5006)
Get Issue - 33 (0.5917, 0.5191, 0.5710)
Fixes #26931
@mantisbt/core-team any feedback on this?
@mantisbt/core-team will merge this PR tomorrow.
@vboctor plesae no rush, see my comment on Gitter for this.
@mantisbt/core-team ping
@atrol @dregad reminder about this PR.
@vboctor I entered some notes to dicuss on Gitter
@atrol and @dregad any thoughts on this PR? I would like to do a final test round and merge.
Sorry @vboctor, I have hardly any time at the moment to have a deeper look. Just in case we get regressions, could you please create two issues / PRs to separate diagnostics and optimizations?
Closing this PR. Portions of this change may be resubmitted in the future as separate PRs.