Skip to content

Fix timeouts when saving authority records - #2422

Open
danloveg wants to merge 4 commits into
artefactual:qa/2.xfrom
danloveg:dev/issue-2421-refactor-qubit-actor-save
Open

danloveg wants to merge 4 commits into
artefactual:qa/2.xfrom
danloveg:dev/issue-2421-refactor-qubit-actor-save

Conversation

@danloveg

@danloveg danloveg commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2421

All events linked to an actor were being saved in a loop any time that actor was saved. This causes a performance hit especially when many events are linked to an actor. I found that saving all the events was unnecessary because existing events are already saved by the EventEditComponent when they're changed. The only events that need to be saved in QubitActor::save are newly created events, since those are not automatically saved by the event edit component. To improve performance:

  • Instead of looping through every event linked to the actor and saving them, only save the events that are newly added.
  • Instead of getting related object IDs by loading all event objects, query for them directly.

@sarah-mason sarah-mason added the Community Pull requests that have been contributed from community members outside Artefactual label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Pull requests that have been contributed from community members outside Artefactual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem: Saving authority records via web UI can cause timeouts

2 participants