Ticket #4503 (assigned enhancement)

Opened 1 year ago

Last modified 2 months ago

[PATCH] performance issues

Reported by: mixedpuppy Assigned to: otaku42 (accepted)
Priority: normal Component: TagsPlugin
Severity: major Keywords: performance
Cc: andref.dias@gmail.com Trac Release: 0.11

Description

The tags plugin is excellent, however, there are some pretty big performance issues.

One is, regardless of specifying a realm (via tags search page or a macro), all tag providers are asked for their tags, and only after that is the realm checked.

The second is checking permissions on each ticket (in the ticket provider). This is fine if you have a few hundred (or thousand) tickets. In a database with a couple hundred thousand tickets, the tags plugin becomes unusable. Relying on a ticket_view and tags_view at a "global" level is sufficient for the majority of cases.

The attached patch addresses both issues above, though I don't regard it as a "final" patch.

Attachments

tagsplugin-perf.patch (2.3 kB) - added by mixedpuppy on 01/23/09 15:10:40.
performance patch
lazy_permission_check.patch (1.5 kB) - added by otaku42 on 01/13/10 06:55:03.
Introduce new ini option that allows to skip "per ticket" permission checks

Change History

01/23/09 15:10:40 changed by mixedpuppy

  • attachment tagsplugin-perf.patch added.

performance patch

03/04/09 04:45:37 changed by andref.dias@gmail.com

  • cc set to andref.dias@gmail.com.
  • type changed from defect to enhancement.

These performance issues are of great interest to me too!

03/04/09 05:50:25 changed by athomas

The patch looks reasonable, though ideally the permission changes would be behind a configuration option - defaulting to the current behaviour, but configurable for a fast path.

(follow-up: ↓ 4 ) 01/12/10 11:53:03 changed by otaku42

  • owner changed from athomas to otaku42.

I just committed the first part of your patch (regarding realm) in r7377. Will try to come up with a patch for part two for the permission checks, where a configuration option modifies the behaviour (as athomas suggested above).

(in reply to: ↑ 3 ) 01/12/10 17:51:35 changed by otaku42

Replying to otaku42:

I just committed the first part of your patch (regarding realm) in r7377.

Guess I had a bad day:

I accidentally committed stuff to the tagged release v0.6 rather than to trunk, which of course was wrong. I'll thus roll back r7377 and re-apply it to trunk.

01/12/10 17:51:55 changed by otaku42

(In [7381]) In a query, a realm may be specified to limit results to the corresponding tag provider. So far all providers were polled anyway, which had a negative impact on performance. This is now fixed. Thanks to mixedpuppy for the patch. Refs #4503.

01/13/10 06:55:03 changed by otaku42

  • attachment lazy_permission_check.patch added.

Introduce new ini option that allows to skip "per ticket" permission checks

01/13/10 06:58:51 changed by otaku42

  • status changed from new to assigned.

lazy_permission_check.patch implements skipping per-ticket permissions as suggested by mixedpuppy, combined with an ini option that allows to enable this feature as suggested by athomas. The default is to stick to the old (current) behaviour.

Please review and test the patch. Once one confirms it works as intended, I'll commit it to the repository.


Add/Change #4503 ([PATCH] performance issues)




Change Properties
Action