performance + refactoring + fix: delegated roles update (add/remove) metadata #627
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve bootstrap performance for hash bins (large number such as 16384 PyPI/RubyGems)
Before : Added 2048 hash bins in 119.36732602119446 seconds
Current: Added 2048 hash bins in 1.8565280437469482 seconds
PyPI (PEP 458) and RubyGems size creation:
Added 16384 hash bins in 15.13554310798645 seconds
Fix query to bump empty target files
the actual crud query fails if there is not target files (artifacts) in
the database (TargetFiles) and do not return the the Target Role.
This commmit fixes this query using isouter
https://docs.sqlalchemy.org/en/20/orm/queryguide/query.html#sqlalchemy.orm.Query.join.params.isouter
Refactor:
update_snapshot
.Split
update_snapshot
in a functional way for:TODO:
Improve the performance and use the celery multi-threading
is_expired
: ~90s_update_targetfiles_hashbin_delegated_roles
: ~250s_update_targetfiles_custom_delegated_roles
(Nice to Have)