Skip to content

feat: cache custom fields#153

Merged
mfiedorowicz merged 5 commits intodevelopfrom
perf/cache-custom-fields
Mar 12, 2026
Merged

feat: cache custom fields#153
mfiedorowicz merged 5 commits intodevelopfrom
perf/cache-custom-fields

Conversation

@mfiedorowicz
Copy link
Copy Markdown
Member

  • cache custom fields query results
  • add diode profile middleware

Cache CustomField DB queries per model class using lru_cache to avoid
repeated identical queries when processing batches of entities.
Invalidate via post_save/post_delete signals on CustomField.
Add DiodeProfileMiddleware that tracks per-request timing, DB query
count, and per-function profiling via @Profiled decorator. Controlled
by DIODE_PROFILE env var (disabled by default). Instrument key
functions: apply_changeset, generate_changeset, transform, find_obj,
auth, fingerprint_dedupe, resolve_refs.
Comment thread netbox_diode_plugin/api/authentication.py
@mfiedorowicz mfiedorowicz merged commit 31302dd into develop Mar 12, 2026
7 checks passed
@mfiedorowicz mfiedorowicz deleted the perf/cache-custom-fields branch March 12, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants