RobertGummesson / BuildTimeAnalyzer-for-Xcode

Build Time Analyzer for Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Ability to analyze single source file

gprasant opened this issue · comments

Some projects have hundreds of swift source files and it can take 10s of minutes to build. But the real problem might be only in a few swift source files. This issue is to add the ability to profile a single swift source file for slow compiling code.

I think there can be two workflows for this.

1. Command line

1. Open Build time analyzer window
2. swiftc <compiler flags> suspiciously_slow.swift -o suspiciously_slow.o
3. The build time analyzer window has the results of the profiling

2. Compiling from xcode

1. Open Build time analyzer Window 
2. navigate to the swift file in question and Product -> Perform Action -> Compile file.swift

Thanks for the suggestion, @gprasant. I had a play and added support for scenario 2. It's currently on this branch. Will need to test it a bit before merging it to master.

Support for scenario 2 now on master.