PathKit
PathKit copied to clipboard
Why use NSString?
Thanks for useful library 😄
While investigating performance problem, I found this library converts Swift.String into NSString and it's very high cost operation.
Why this library uses NSString instead of implementing its own logic?
If you look into code you see "expandingTildeInPath" which is defined in @interface NSString (NSStringPathExtensions). Code behind expandingTildeInPath is NSFileManager + NSHomeDirectory which use NSString. What is your solution/workaround?
I mean using these Obj-C API is convenient but high cost, so I prefer to implement the logics in pure Swift in aspect of performance.
It would be very valuable improvement because this library is used in many popular OSS 👍 If I can get agreements from this project author, I'll implement it.
see https://github.com/kylef/PathKit/pull/72/files#r391294029 for some mitigation