Share work item custom types across namespaces in a request
What does this MR do and why?
Deciding whether a user can see an issue looks up which work item types exist, including custom types. Custom types are set per organization or per top-level group, but they were looked up again for every project, so a list of issues from 12 projects ran the same query 12 times.
This MR looks them up once per organization or top-level group in a request and reuses the result. Clearing the work item type cache also clears the shared copy, so changes to custom types are still picked up.
Local measurements, 96 issues across 12 projects:
| Queries before | Queries after | |
|---|---|---|
| Checking each issue on its own | 423 | 412 |
| Checking the list at once (!263779 (merged)) | 44 | 33 |
References
- Builds on !263779 (merged), which adds checking a list of issues at once.
Screenshots or screen recordings
Not applicable: no UI changes.
How to set up and validate locally
Nothing to check by hand. The spec shows that projects under the same top-level group or organization share one lookup.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.