# Bug OP-16064 - Performance issues on work_packages api endpoint

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 15.1.0 |
| Observed in versions | 14.6.0 |
| Sprint | 15.1.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 14.6.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 |  |
| Accountable | Christophe Bliard |
| Product manager |  |
| Developers | OP Dev Titan Team |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

On prod vips2, we identified through AppSignal that the endpoint **GET::API::V3::WorkPackages::WorkPackagesAPI#/work\_packages/** is performing badly.

[https://appsignal.com/openproject-gmbh/sites/632371afd2a5e463ef717ecb/performance/incidents/146](https://appsignal.com/openproject-gmbh/sites/632371afd2a5e463ef717ecb/performance/incidents/146)

### What is the buggy behavior?

Mean is 700ms with a 90th of more than 1000ms

AppSignal reports a detected N+1 query.

Here is a sample: [https://appsignal.com/openproject-gmbh/sites/632371afd2a5e463ef717ecb/performance/incidents/146/samples/632371afd2a5e463ef717ecb-28512018809119998561730193720](https://appsignal.com/openproject-gmbh/sites/632371afd2a5e463ef717ecb/performance/incidents/146/samples/632371afd2a5e463ef717ecb-28512018809119998561730193720)

It was visible on vips2 because of a client script continuously requesting this api endpoint, and consuming many resources on that instance.

### What is the expected behavior?

Making it faster.

### Environment information

**OpenProject installation type**

*   [x] Hosted cloud edition

**OpenProject version**

14.6.2
