Hey guys!
So I used -stats-output-dir
to gather stats on my compilation process and it gave me this output...
Total Execution Time: 2.0569 seconds (2.2906 wall clock)
---User Time--- --System Time-- --User+System-- ---Wall Time--- ---Instr--- --- Name ---
0.0793 ( 13.8%) 0.0824 ( 5.6%) 0.1618 ( 7.9%) 0.1967 ( 8.6%) 1674794499 parse-and-resolve-imports
0.0789 ( 13.7%) 0.0823 ( 5.6%) 0.1613 ( 7.8%) 0.1962 ( 8.6%) 1665966737 Import resolution
0.0413 ( 7.2%) 0.1374 ( 9.3%) 0.1787 ( 8.7%) 0.1934 ( 8.4%) 428113539 perform-sema
0.0413 ( 7.2%) 0.1374 ( 9.3%) 0.1787 ( 8.7%) 0.1934 ( 8.4%) 428012485 TypeCheckSourceFileRequest
0.0413 ( 7.2%) 0.1373 ( 9.3%) 0.1785 ( 8.7%) 0.1932 ( 8.4%) 427651696 Type checking and Semantic analysis
0.0385 ( 6.7%) 0.1210 ( 8.2%) 0.1595 ( 7.8%) 0.1742 ( 7.6%) 395192741 TypeCheckFunctionBodyRequest
So I looked at my configuration and it turns out that I am passing 107 dependencies to this library, I'm using swiftc
and passing them via -I
.
Questions:
#1: parse-and-resolve-imports
and Import Resolution
are not the same thing, right?
#2: How can I shorten these 2 stages so that it's way faster? I am using just raw swiftc
. Is it only the number of dependencies that is problematic? Or there is something I can optimize within dependencies themselves OR my setup to make the compilation faster?
#3: Some of the modules that I'm importing I am importing as @_implementationOnly
- I wonder if this affects compilation performance?