Skip to content

Conversation

@mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Sep 3, 2024

  • Count the references directly into a single map, instead of allocating partial maps and copying data between them
  • Restructure to minimize code duplication

Should not change behavior, overall. See individual commits and commit messages for details and an easier-to-review version.

@mtrmac mtrmac force-pushed the oci-delete-refactor branch from 8b2204a to 0c12b6c Compare September 3, 2024 19:19
@rhatdan
Copy link
Member

rhatdan commented Sep 3, 2024

LGTM

@mtrmac mtrmac force-pushed the oci-delete-refactor branch 2 times, most recently from 4db8981 to a3c2a85 Compare September 5, 2024 18:05
@rhatdan
Copy link
Member

rhatdan commented Sep 5, 2024

@Luap99 @giuseppe PTAL

@rhatdan
Copy link
Member

rhatdan commented Sep 5, 2024

@kolyshkin PTAL

... and use slices.Contains instead of a manual loop.

Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
... so that we don't always create a new map.

Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
…ation

Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
... instead of maintaining two copies.

Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
…only caller

Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
... and document it a bit better

Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
@mtrmac mtrmac force-pushed the oci-delete-refactor branch from a3c2a85 to f957a9e Compare September 5, 2024 19:40
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhatdan rhatdan merged commit 1a02a3d into containers:main Sep 9, 2024
@mtrmac mtrmac deleted the oci-delete-refactor branch September 9, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants