Skip to content

Cache model-specific custom field lookups for the duration of a request #21300

@jeremystretch

Description

@jeremystretch

NetBox Version

v4.5.1

Python Version

3.12

Area(s) of Concern

  • User Interface
  • REST API
  • GraphQL API
  • Python ORM
  • Other

Details

Similar to #21259, we can cache the result of fetching custom fields for a specific model for the duration of the request. This will avoid redundant calls to e.g. CustomField.objects.get_for_model(Site) for each object in a request. (Currently, custom fields are inspected for each object when its save() method is called.)

Metadata

Metadata

Assignees

Labels

netboxstatus: acceptedThis issue has been accepted for implementationtype: performanceA concern regarding application performance

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions