Project

Profile

Help

Task #5461

Imporve performance at content relation time

Added by ttereshc about 2 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

During sync for some content, like Modulemd and Packages, relations are created.

Currently an attempt to create a relation happens for every content in that relation and regardless if it exists or not, if content is saved to the DB or is still in memory only.

To reduce DB requests, the suggestion is to inspect relations (declarative content for both content units is available) and try to create a relation if it doesn't exist.
- check that both objects are saved in the DB, if it's not the case, there is no need even to try to create a relation.
- check if the relation already exists

Associated revisions

Revision b80daa3b View on GitHub
Added by Fabricio Aguiar about 2 years ago

Imporve performance at content relation time

https://pulp.plan.io/issues/5461 closes #5461

History

#1 Updated by ttereshc about 2 years ago

  • Tags Pulp 3 RPM blocker added

#2 Updated by dalley about 2 years ago

We should use this when possible: https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.bulk_update

I don't know that we can, due to the way our content objects are structured.

If we cannot -- transactions usually help performance.

#3 Updated by fao89 about 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fao89

#4 Updated by fao89 about 2 years ago

  • Status changed from ASSIGNED to POST

#5 Updated by Anonymous about 2 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#6 Updated by ttereshc almost 2 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#7 Updated by bmbouter over 1 year ago

  • Tags deleted (Pulp 3 RPM blocker)

Please register to edit this issue

Also available in: Atom PDF