How do I make the f # compiler (fsc) verbose?
I have a small to medium size F # project, 15 * .fs files, about 2000 lines of code. Suddenly it had to compile a bit, about 5 seconds. I would like to know what makes compilation slow, but cannot find a switch for fsc like "verbose" that makes it show progress information.
Does anyone know how to track down the F # fsc compiler to get an idea of ββwhere to set up compilation?
+3
source to share
1 answer
--times
switch "displays timing information for compilation". It displays very detailed information and should help you understand that it takes so long
Compiling the following program
open System
[<EntryPoint>]
let main argv =
printfn "Hello World"
Console.ReadLine() |> ignore
0
produces this conclusion
Microsoft (R) F# Compiler version 12.0.30110.0
Copyright (c) Microsoft Corporation. All Rights Reserved.
TIME: 0.1 Delta: 0.0 Mem: 34 G0: 0 G1: 0 G2: 0 [Import mscorlib]
TIME: 0.1 Delta: 0.0 Mem: 35 G0: 0 G1: 0 G2: 0 [Import mscorlib and FSharp.Core.dll]
TIME: 0.4 Delta: 0.3 Mem: 60 G0: 5 G1: 3 G2: 1 [Import system references]
TIME: 0.4 Delta: 0.0 Mem: 64 G0: 1 G1: 1 G2: 0 [Parse inputs]
TIME: 0.4 Delta: 0.0 Mem: 64 G0: 0 G1: 0 G2: 0 [Import non-system references]
TIME: 0.5 Delta: 0.1 Mem: 68 G0: 1 G1: 1 G2: 0 [Typecheck]
TIME: 0.5 Delta: 0.0 Mem: 68 G0: 0 G1: 0 G2: 0 [Typechecked]
TIME: 0.5 Delta: 0.0 Mem: 69 G0: 0 G1: 0 G2: 0 [Write Interface File]
TIME: 0.5 Delta: 0.0 Mem: 69 G0: 0 G1: 0 G2: 0 [Write XML document signatures]
TIME: 0.5 Delta: 0.0 Mem: 69 G0: 0 G1: 0 G2: 0 [Write XML docs]
TIME: 0.5 Delta: 0.0 Mem: 69 G0: 0 G1: 0 G2: 0 [Write HTML docs]
TIME: 0.6 Delta: 0.1 Mem: 73 G0: 2 G1: 1 G2: 1 [Encode Interface Data]
TIME: 0.7 Delta: 0.1 Mem: 76 G0: 1 G1: 1 G2: 0 [Optimizations]
TIME: 0.7 Delta: 0.0 Mem: 77 G0: 0 G1: 0 G2: 0 [Ending Optimizations]
TIME: 0.7 Delta: 0.0 Mem: 77 G0: 0 G1: 0 G2: 0 [Encoding OptData]
TIME: 0.7 Delta: 0.0 Mem: 77 G0: 0 G1: 0 G2: 0 [TAST -> ILX]
TIME: 0.7 Delta: 0.0 Mem: 77 G0: 0 G1: 0 G2: 0 [ILX -> IL (Unions)]
TIME: 0.7 Delta: 0.0 Mem: 77 G0: 0 G1: 0 G2: 0 [ILX -> IL (Funcs)]
ilwrite: TIME 0.000 (total) 0.686 (delta) - Write Started
ilwrite: TIME 0.000 (total) 0.000 (delta) - Module Generation Preparation
ilwrite: TIME 0.000 (total) 0.000 (delta) - Module Generation Pass 1
ilwrite: TIME 0.000 (total) 0.000 (delta) - Module Generation Pass 2
ilwrite: TIME 0.016 (total) 0.016 (delta) - Module Generation Pass 3
ilwrite: TIME 0.016 (total) 0.000 (delta) - Module Generation Pass 4
ilwrite: TIME 0.016 (total) 0.000 (delta) - Finalize Module Generation Results
ilwrite: TIME 0.016 (total) 0.000 (delta) - Generated Tables and Code
ilwrite: TIME 0.016 (total) 0.000 (delta) - Layout Header of Tables
ilwrite: TIME 0.016 (total) 0.000 (delta) - Build String/Blob Address Tables
ilwrite: TIME 0.016 (total) 0.000 (delta) - Sort Tables
ilwrite: TIME 0.016 (total) 0.000 (delta) - Write Header of tablebuf
ilwrite: TIME 0.016 (total) 0.000 (delta) - Write Tables to tablebuf
ilwrite: TIME 0.016 (total) 0.000 (delta) - Layout Metadata
ilwrite: TIME 0.016 (total) 0.000 (delta) - Write Metadata Header
ilwrite: TIME 0.016 (total) 0.000 (delta) - Write Metadata Tables
ilwrite: TIME 0.016 (total) 0.000 (delta) - Write Metadata Strings
ilwrite: TIME 0.016 (total) 0.000 (delta) - Write Metadata User Strings
ilwrite: TIME 0.016 (total) 0.000 (delta) - Write Blob Stream
ilwrite: TIME 0.016 (total) 0.000 (delta) - Fixup Metadata
ilwrite: TIME 0.016 (total) 0.000 (delta) - Generated IL and metadata
ilwrite: TIME 0.016 (total) 0.000 (delta) - Layout image
ilwrite: TIME 0.016 (total) 0.000 (delta) - Writing Image
ilwrite: TIME 0.016 (total) 0.000 (delta) - Finalize PDB
ilwrite: TIME 0.016 (total) 0.000 (delta) - Signing Image
TIME: 0.7 Delta: 0.0 Mem: 78 G0: 0 G1: 0 G2: 0 [Write .NET Binary]
TIME: 0.7 Delta: 0.0 Mem: 78 G0: 0 G1: 0 G2: 0 [Write Stats File]
+5
source to share