editEntity times out if there are many annotations for the entity #2827
Labels
No labels
backend
critical
defect
duplicate
enhancement
fixed
frontend
general
invalid
major
minor
normal
oxjs
pandora_client
python-ox
task
trivial
wontfix
worksforme
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: 0x2620/pandora#2827
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Entity.save() updates all annotations for that entity in case its name has changed. This is slow if there are many annotations for the entity: for example, updating ~1.7k annotations for an entity takes around 7 minutes. editEntity times out long before that point!
Patch to follow to move updating all the annotations into an async task as a quick fix to make the UI responsive. It's still not great that this is so expensive. It would be nice to only refresh the annotations if the name has actually changed. It would be even nice to do that more cheaply!
Annotations.objects.filter(...).update(findvalue=..., ...)
is of course way faster but doesn't update the clips…Attachment 0001-Entity.save-update-annotations-async-fixes-2827-kind.patch (2035 bytes) added
In [pandora,5014]changeset:"pandora,5014":
yes would be nicer to do more targeted updates. but async should be mostly ok
Thanks! Let's see if this turns out okay in practice, and if not I can take another look…
In 691b3fa9/pandora: