kitops icon indicating copy to clipboard operation
kitops copied to clipboard

Add multi-threading for pack/unpack

Open cr3ativ3cod3r opened this issue 1 month ago • 0 comments

Description

This PR introduces parallel processing of pack and unpack operations. Previously the layers were packed and unpacked sequentially.

  • In savekitfilelayers, calls to savecontentlayer is now executed in a new goroutine. They are also indexed, so that the order of layers is preserved.
  • In unpackrecursive, calls to unpacklayers is now executed in a new goroutine.
  • For the progress bars, created an instance of mpb.Progress and each goroutine adds a bar to this shared instance.
  • In ignorepaths struct, added a mutex and used it in matches method as MatchesOrParentMatches is not safe for concurrent access.

Linked issues

closes #254

AI-Assisted Code

  • [x] This PR contains AI-generated code that I have reviewed and tested
  • [x] I take full responsibility for all code in this PR, regardless of how it was created

cr3ativ3cod3r avatar Nov 23 '25 10:11 cr3ativ3cod3r