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

Slow compile time for "func blurred(withRadius radius: CGFloat) -> Image" #611

Closed
bes opened this issue Mar 1, 2017 · 5 comments
Closed

Comments

@bes
Copy link

bes commented Mar 1, 2017

Hi,

The Kingfisher project has previously solved issues with slow compile times (#467, #468), so I am posting this in the hopes of you being able to solve this new one that I am seeing since recently upgrading to the latest version (3.5.0 / 5cfa0dd):

1763.4ms        .../Pods/Kingfisher/Sources/Image.swift:442:17   public final func blurred(withRadius radius: CGFloat) -> Image
1761.1ms        .../Pods/Kingfisher/Sources/Image.swift:442:17   public final func blurred(withRadius radius: CGFloat) -> Image

CC @frankrausch @onevcat

Thanks, BR, Erik

@bes bes changed the title Slow compile time for function Slow compile time for "func blurred" Mar 1, 2017
@bes bes changed the title Slow compile time for "func blurred" Slow compile time for "func blurred(withRadius radius: CGFloat) -> Image" Mar 1, 2017
@frankrausch
Copy link
Contributor

Do you remember which version you had before? That would make it easier to isolate the problem.

I took a quick look at the blurred function but didn’t see anything suspicious (like a complex equation in one line).

@bes
Copy link
Author

bes commented Mar 1, 2017

This is showing up since upgrading from 3.3.3, but I can't see any changes in blurred between those versions. Right now blurred is the function that takes the longest time to compile in our project (according to -debug-time-function-bodies), but I can't say how accurate that is...

I am coming from 7 years of Android development, and I must say the iOS tool chain is quite bad compared to anything Java / Android related.

@onevcat
Copy link
Owner

onevcat commented Mar 1, 2017

Should be fixed in #613

It took me about 2000ms before. And now 100ms.

@onevcat onevcat closed this as completed Mar 1, 2017
@bes
Copy link
Author

bes commented Mar 1, 2017

Thank you!

@frankrausch
Copy link
Contributor

Amazing! Still unbelievable that splitting the statement into 3 lines makes such a huge compile time difference.

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