Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why use NSString? #70

Open
kateinoigakukun opened this issue Sep 16, 2019 · 3 comments
Open

Why use NSString? #70

kateinoigakukun opened this issue Sep 16, 2019 · 3 comments

Comments

@kateinoigakukun
Copy link

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?

@xhruso00
Copy link

xhruso00 commented Oct 31, 2019

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?

@kateinoigakukun
Copy link
Author

kateinoigakukun commented Nov 19, 2019

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.

@michaeleisel
Copy link

see https://github.com/kylef/PathKit/pull/72/files#r391294029 for some mitigation

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

No branches or pull requests

3 participants