[PR #18721] [MERGED] Closes #18403: Do not retrieve the data field from Job objects unless needed #15424

Closed
opened 2025-12-30 00:21:50 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18721
Author: @atownson
Created: 2/24/2025
Status: Merged
Merged: 2/25/2025
Merged by: @bctiemann

Base: mainHead: issue_18403


📝 Commits (1)

  • 5a3e213 Do not retrieve the data field from Job objects unless needed

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 netbox/core/views.py (+3 -3)
📝 netbox/netbox/views/generic/feature_views.py (+1 -1)

📄 Description

Closes: #18403

Defer the retrieval of the data field for certain Job queries (queries that do not need access to the data). This improves responsiveness of the forms and reduces memory consumption.

The housekeeping queries were not changed because both use either the count() aggregate or the delete() function. Adding the defer() function would not alter the SQL statement.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/18721 **Author:** [@atownson](https://github.com/atownson) **Created:** 2/24/2025 **Status:** ✅ Merged **Merged:** 2/25/2025 **Merged by:** [@bctiemann](https://github.com/bctiemann) **Base:** `main` ← **Head:** `issue_18403` --- ### 📝 Commits (1) - [`5a3e213`](https://github.com/netbox-community/netbox/commit/5a3e213fb4621b2208bac1def405806fdbaa9fab) Do not retrieve the data field from Job objects unless needed ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/views.py` (+3 -3) 📝 `netbox/netbox/views/generic/feature_views.py` (+1 -1) </details> ### 📄 Description ### Closes: #18403 Defer the retrieval of the `data` field for certain Job queries (queries that do not need access to the data). This improves responsiveness of the forms and reduces memory consumption. The housekeeping queries were not changed because both use either the `count()` aggregate or the `delete()` function. Adding the `defer()` function would not alter the SQL statement. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:21:50 +01:00
adam closed this issue 2025-12-30 00:21:50 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15424