RobertGummesson / BuildTimeAnalyzer-for-Xcode

Build Time Analyzer for Swift
MIT License
4.3k stars 260 forks source link

Add Ability to analyze single source file #36

Closed gprasant closed 8 years ago

gprasant commented 8 years ago

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
RobertGummesson commented 8 years ago

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.

RobertGummesson commented 8 years ago

Support for scenario 2 now on master.