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

Speed up parsing of swift function times and parse swift whole modules #48

Merged
merged 2 commits into from
Jan 13, 2020

Conversation

ecamacho
Copy link
Collaborator

Solves issues from #47

  1. Speeds up parsing swift function times by using a better version of String.substring. With large texts (like the ones generated by Swiftc with the function times) the old one could take up to 9 secs. The new one takes a few milliseconds. It also uses parallel parsing of the texts. Using the Kickstarter iOS project, in my machine the parsing went from 220 secs to 8 secs.

  2. When a Swift module is compiled with the option whole module instead of incremental, the Log doesn't contain the information about the Swift files that were compiled in the module as sub steps. I'm parsing that information and adding it to the Json file, along with the warnings, errors and swift function times.
    Originally, the step got only one subStep:

  • CompileSwiftSources
    • CompileSwift normal x86_64 file1.swift file2.swift ...

With this change, I'm replacing that subStep and adding the array of Swift files that were compiled:

  • CompileSwiftSources
    • CompileSwift normal x86_64 file1.swift
    • CompileSwift normal x86_64 file2.swift

Copy link
Collaborator

@BalestraPatrick BalestraPatrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice performance improvements, good job!

@mariozig
Copy link
Contributor

mariozig commented Jan 12, 2020

Nice!!
@ecamacho any idea when you will merge this and release 0.2.0?

I have an update for the homebrew formula locked and loaded :) mariozig/homebrew-public@88ba90b

@ecamacho ecamacho merged commit 2776756 into master Jan 13, 2020
@ecamacho ecamacho deleted the swift_func_improv branch January 13, 2020 08:27
@ecamacho
Copy link
Collaborator Author

@mariozig awesome, I just released it

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

Successfully merging this pull request may close these issues.

3 participants