mantisbt icon indicating copy to clipboard operation
mantisbt copied to clipboard

REST API diagnostic headers and optimizations

Open vboctor opened this issue 5 years ago • 8 comments

  • X-Mantis-QueriesCount - always include when show_queries_count is enabled.
  • X-Mantis-Queries - show when show_queries_count is enabled, log_level includes LOG_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

vboctor avatar May 03 '20 03:05 vboctor

@mantisbt/core-team any feedback on this?

vboctor avatar May 10 '20 17:05 vboctor

@mantisbt/core-team will merge this PR tomorrow.

vboctor avatar May 16 '20 21:05 vboctor

@vboctor plesae no rush, see my comment on Gitter for this.

atrol avatar May 17 '20 07:05 atrol

@mantisbt/core-team ping

vboctor avatar May 23 '20 21:05 vboctor

@atrol @dregad reminder about this PR.

vboctor avatar Nov 01 '20 18:11 vboctor

@vboctor I entered some notes to dicuss on Gitter

atrol avatar Nov 18 '20 19:11 atrol

@atrol and @dregad any thoughts on this PR? I would like to do a final test round and merge.

vboctor avatar Oct 17 '21 18:10 vboctor

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?

atrol avatar Oct 27 '21 08:10 atrol

Closing this PR. Portions of this change may be resubmitted in the future as separate PRs.

vboctor avatar Apr 09 '23 01:04 vboctor