Skip to content

Reduce db calls when presenting droplets#4909

Open
philippthun wants to merge 1 commit intocloudfoundry:mainfrom
sap-contributions:droplet-presenter-eager-loading
Open

Reduce db calls when presenting droplets#4909
philippthun wants to merge 1 commit intocloudfoundry:mainfrom
sap-contributions:droplet-presenter-eager-loading

Conversation

@philippthun
Copy link
Member

@philippthun philippthun commented Mar 5, 2026

Eager load metadata, buildpack_lifecycle_data, buildpack_lifecycle_buildpacks, and cnb_lifecycle_data.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@philippthun philippthun force-pushed the droplet-presenter-eager-loading branch from 4395173 to f48f0e6 Compare March 5, 2026 16:37
@philippthun philippthun force-pushed the droplet-presenter-eager-loading branch 2 times, most recently from 94ddbd0 to 6c7f090 Compare March 5, 2026 16:47
@philippthun philippthun closed this Mar 5, 2026
@philippthun philippthun reopened this Mar 5, 2026
@philippthun
Copy link
Member Author

Tests with production data (GET /v3/droplets?per_page=5000 as admin user) show significant improvements:

response time:  ~27s    ->  ~2s
db queries:     ~20000  ->  ~10
db query time:  ~12s    ->  ~0.5s

@philippthun philippthun closed this Mar 6, 2026
@philippthun philippthun reopened this Mar 6, 2026
Eager load metadata, buildpack_lifecycle_data,
buildpack_lifecycle_buildpacks, and cnb_lifecycle_data.
@philippthun philippthun force-pushed the droplet-presenter-eager-loading branch from 6c7f090 to dd40cb9 Compare March 6, 2026 08:38
@philippthun philippthun marked this pull request as ready for review March 6, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant