Skip to content

fix: use FileManager for file and directory removal to fix performance issues - #85

Merged
fortmarek merged 1 commit into
mainfrom
fix/remove-performance
Nov 7, 2024
Merged

fix: use FileManager for file and directory removal to fix performance issues#85
fortmarek merged 1 commit into
mainfrom
fix/remove-performance

Conversation

@fortmarek

Copy link
Copy Markdown
Member

As flagged in apple/swift-nio#2933, the NIOFileSystem removal performance is abysmal. Ideally, we'd do a fix in swift-nio, but for now, the quicker solution is to move to FileManager.

@fortmarek
fortmarek requested a review from pepicrft November 7, 2024 11:32
@fortmarek
fortmarek force-pushed the fix/remove-performance branch from 18c6a02 to 1b3e595 Compare November 7, 2024 11:32
@fortmarek fortmarek changed the title Use FileManager for file and directory removal to fix performance issues fix: use FileManager for file and directory removal to fix performance issues Nov 7, 2024
@fortmarek
fortmarek force-pushed the fix/remove-performance branch from 1b3e595 to 8785787 Compare November 7, 2024 11:34
Comment on lines -81 to -85
/// It removes the file or directory at the given path.
/// - Parameters:
/// - path: The path to the file or directory to remove.
/// - recursively: When removing a directory, it removes the sub-directories recursively.
func remove(_ path: AbsolutePath, recursively: Bool) async throws

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

FileManager doesn't have a distinction for a recursive removal – and it's not something we're using in tuist/tuist

@fortmarek
fortmarek merged commit 94b4333 into main Nov 7, 2024
@fortmarek
fortmarek deleted the fix/remove-performance branch November 7, 2024 11:43
@fortmarek fortmarek mentioned this pull request Nov 7, 2024
6 tasks
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.

1 participant