# Bug OP-16478 - Slow /api/v3/work_packages/*/available_relation_candidates

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-16478

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 15.2.1 |
| Observed in versions | 14.0.0 |
| Sprint | 15.2.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 14.0.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Markus Kahl |
| Accountable | Jens Ulferts |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Have roughly
    
    1.  150k Relations
        
    2.  1 m work packages
        
    3.  possibly other preconditions
        
2.  Login as admin (might be worse or better as non admin)
    
3.  Go to a work package
    
4.  Go to the activities tab
    
5.  Open the modal to add a new relation (e.g. related to, blocks, ...)
    

### What is the buggy behavior?

The response is very slow.

### What is the expected behavior?

The response time is acceptable.
