# Bug OP-16565 - Poor performance of GET /api/v3/work_packages/:id and PATCH /api/v3/work_packages/:id

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 15.3.0 |
| Observed in versions |  |
| Sprint | 15.3.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| 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 |  |
| 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 a larger dataset
    
    1.  1m+ work packages
        
    2.  50k users
        
    3.  150k relations
        

### What is the buggy behavior?

Requests for

*   GET /api/v3/work\_packages/:id
    
*   PATCH /api/v3/work\_packages/:id
    

are slow mostly because of the relations included in the work package resource response.

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/294288/content">

### What is the expected behavior?

Faster response time.
