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

compiling time costs 2-3 minutes after import swift code files, is it normal? #137

Closed
liuxuan30 opened this issue Jun 9, 2015 · 4 comments

Comments

@liuxuan30
Copy link
Member

I have dragged the ios charts swift files into my Objective-C project, successfully compile and show beautiful chart now.

But I notice the whole compile time (do clean first) is cost from ~20-30 secs to ~2-3 minutes. Is it normal? I am wondering, if I just use Embedded Framework, will it be as fast as the pure Objective-C project of mine?

PS: I have to support iOS 7 for now, but I am considering when to drop it after iOS 9 is released.

@liuxuan30 liuxuan30 changed the title compiling time costs 2-4 minutes after import swift code files, is it normal? compiling time costs 2-3 minutes after import swift code files, is it normal? Jun 9, 2015
@danielgindi
Copy link
Collaborator

Compiling Swift is generally slower now than compiling ObjC. I do not know if it's slower for iOS 7, but I do know that it is faster in latest Xcode than in the previous version - and we can expect more improvements in the next versions.

You shouldn't drop iOS 7 support until one of these is true:

  1. iOS 9.0 is alive for at least 6 months
  2. You have analytics in your app, showing your iOS 7 user base dropped below 5%

@liuxuan30
Copy link
Member Author

Thanks daniel, I have data that shows there are ~8%-15% iOS 7 users are still fighting, especially some 4S devices.

I was planning if iOS 9 drop 4S, I could do that too, however... :(

Besides, are you implying using embedded framework won't help reduce compile time? I was wondering if this is the main reason, since a framework should be compiled or optimized at some level.

@danielgindi
Copy link
Collaborator

Yes I think that embedded framework just helps you regarding order of things. If new files are added to the framework, you don't have to drag more files to your project. You are already compiling a Framework...

But I might miss some things, maybe special optimizations in Frameworks, or maybe compilation for iOS 9, for example, behaves differently in Swift - as iOS 9 allows you to have different binaries for different devices or OS versions.

The only way to really know is to watch the WWDC videos and listen closely, and actually test the different situations...

@danielgindi
Copy link
Collaborator

Anyway, there's nothing we can really do here so I'm closing it. If you have an update feel free to reopen :-)

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

2 participants