BuildTimeAnalyzer-for-Xcode | Build Time Analyzer for Swift | Build Tool library
kandi X-RAY | BuildTimeAnalyzer-for-Xcode Summary
kandi X-RAY | BuildTimeAnalyzer-for-Xcode Summary
Build Time Analyzer for Xcode.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of BuildTimeAnalyzer-for-Xcode
BuildTimeAnalyzer-for-Xcode Key Features
BuildTimeAnalyzer-for-Xcode Examples and Code Snippets
Community Discussions
Trending Discussions on BuildTimeAnalyzer-for-Xcode
QUESTION
I've realised that my iOS project (quite large, only swift code) is taking a very long time to build, so I started analysing the code build time using -debug-time-function-bodies
and checking the transcript logs.
I noticed that a lot of my functions are getting compiled 25 or 26 times.
What can be causing this kind of issue?
To make this question easier to understand here's a screenshot from BuildTimeAnalyzer for Xcode
As you can see under occurrences
some functions are built 25 or 26 times.
ANSWER
Answered 2019-Dec-16 at 07:08The data you provided is not enough to tell what is the actual cause but I'm going to summaries some possibilities.
What is the meaning of occurrence?It means the compiler is type checking a method or property or expression multiple times.
How should I know what and where is that method and how much time exactly it takes?By enabling these two flags you can see them directly in code:
QUESTION
After migrating to Swift 3.0 our first time build time now takes 7 minutes when it used to take 1:20. Does anyone know how can I speed this up?
I work on a large project with lots of Objective C files, approximately 640 Swift files, 20 Cocoapod dependencies, a Today View extension and UITests. After the first time build, an incremental build only takes about 10 seconds.
I have run the excellent Build Time Analyzer here: https://github.com/RobertGummesson/BuildTimeAnalyzer-for-Xcode and attached a screenshot below.
It seems that several of the functions in about 20 of the classes are compiled 631 times. This seems like the problem but I don't know how to fix it. No other function or class takes very long to compile on its own.
Almost all of the 7 minute build time is spent on compiling swift files up until this output: After this line all of the rest of the swift files are compiled and run in about 10 seconds.
It's worth noting that the generated project-swift.h file is 4500 lines long and the bridging-header has 150 lines of imports.
...ANSWER
Answered 2017-Feb-13 at 05:24This may not be a complete solution, but here is at least what is happening. So, you might have 631 files pointing to ViewControllerRecycler.swift
.
lets say that ClassA calls something from ViewControllerRecycler.swift
, ClassC calls something from ViewControllerRecycler.swift
and so on.
If you follow this and add the debugging flag -driver-show incremental
to "other swift flags", you will see something like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install BuildTimeAnalyzer-for-Xcode
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page