Skip to content

Conversation

valentijnscholten
Copy link
Member

@valentijnscholten valentijnscholten commented Aug 4, 2025

This is the 4th performance improvement PR in a series of small improvements.

The current implementation of the import and reimport executes the product grading for each finding that is imported. This results in lots of background celery tasks putting a non-trivial strain on the database.

This PR uses a celery chord to reduce this to only two product grading calls.

By design the chord will only start processing once all tasks have been submitted to it, which is after all findings have been imported. So the post processing starts later. But since the product grading calls are not being called anymore for each finding, the net result will almost always be that the processing will finish sooner. For very big imports it might useful to batch the post processing into chords of a certain size, i.e. 1000. That way after 1000 findings imported the processing can already start. You will then have a product grading call for each 1000 findings. I did not yet implement this yet as I wanted to do an MVP and collect feedback first.

Copy link
Contributor

github-actions bot commented Aug 4, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

github-actions bot commented Aug 4, 2025

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

github-actions bot commented Sep 6, 2025

Conflicts have been resolved. A maintainer will review the pull request shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants