Skip to content

Instantly share code, notes, and snippets.

@eeue56
Last active April 20, 2018 16:44
Show Gist options
  • Select an option

  • Save eeue56/4fbf9fedfb03479410d7a21be69f2f3a to your computer and use it in GitHub Desktop.

Select an option

Save eeue56/4fbf9fedfb03479410d7a21be69f2f3a to your computer and use it in GitHub Desktop.

Repo: https://github.com/rtfeldman/elm-spa-example

Clean build

noah@Noahs-MacBook-Pro ~/d/elm-spa-example> time elm-make src/Main.elm --output /dev/null
Success! Compiled 93 modules.
Successfully generated /dev/null
        8.44 real        15.88 user        16.76 sys

Other info

noah@Noahs-MacBook-Pro ~/d/elm-spa-example> cloc .
     242 text files.
     233 unique files.
      35 files ignored.

github.com/AlDanial/cloc v 1.72  T=1.14 s (182.2 files/s, 42179.3 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
HTML                             1           1002              0          16862
Elm                            122           5727           4610          11497
JavaScript                      22           1036            243           5302
Markdown                        27            367              0            880
JSON                            28              0              0            498
YAML                             4             11              0             75
Bourne Shell                     4             13              0             34
-------------------------------------------------------------------------------
SUM:                           208           8156           4853          35148
-------------------------------------------------------------------------------

Repo: https://github.com/futurice/mibit

Clean compile

noah@Noahs-MacBook-Pro ~/d/m/frontend> time elm-make Main.elm --output /dev/null
Success! Compiled 137 modules.
Successfully generated /dev/null
       18.45 real        34.31 user        38.08 sys

Other info

noah@Noahs-MacBook-Pro ~/d/m/frontend> cloc .
     528 text files.
     514 unique files.
     187 files ignored.
github.com/AlDanial/cloc v 1.72  T=2.19 s (155.4 files/s, 23840.7 lines/s)

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                            191           9355           7424          23007
JavaScript                      36           1132            264           6223
Sass                            22            204             12           2013
Markdown                        36            484              0           1155
JSON                            42              0              0            775
YAML                             6             17              0            124
Bourne Shell                     5             23              1             67
HTML                             2              2              1             36
Lisp                             1              0              0              2
-------------------------------------------------------------------------------
SUM:                           341          11217           7702          33402
-------------------------------------------------------------------------------
@dustinfarris
Copy link

Repo is private. I have 2 "main" files. One for a desktop build and one for a mobile build. A lot of the project is shared between the two. The differences are in the nested pages — following the elm-spa-example, I have individual modules under a Desktop/Pages and a Mobile/Pages directory. There are more pages under Mobile/Pages because the UI is divided up more.

Clean compile of Desktop.elm

└──➤ time elm-make --output=/dev/null elm/Desktop.elm
Success! Compiled 126 modules.
Successfully generated /dev/null
elm-make --output=/dev/null elm/Desktop.elm  43.13s user 50.92s system 384% cpu 24.447 total

Clean compile of Mobile.elm

└──➤ time elm-make --output=/dev/null elm/Mobile.elm
Success! Compiled 134 modules.
Successfully generated /dev/null
elm-make --output=/dev/null elm/Mobile.elm  194.21s user 95.96s system 208% cpu 2:19.16 total

Other info

└──➤ cloc elm
      61 text files.
      61 unique files.
       1 file ignored.

github.com/AlDanial/cloc v 1.74  T=0.21 s (284.7 files/s, 61751.7 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                             60           2432            468          10113
-------------------------------------------------------------------------------
SUM:                            60           2432            468          10113
-------------------------------------------------------------------------------

@pdamoc
Copy link

pdamoc commented Sep 11, 2017

Private repo:

Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                             62           2073            332           8296
JavaScript                       2             20             15             80
-------------------------------------------------------------------------------
SUM:                            64           2093            347           8376
-------------------------------------------------------------------------------

cold compile

$ time elm-make frontend/Main.elm --output /dev/null
Success! Compiled 175 modules.                                      
Successfully generated /dev/null

real	0m26.080s
user	0m45.082s
sys	0m13.639s

iterative compile after changing a Data file that is being imported in a lot of places.

time elm-make frontend/Main.elm --output /dev/null
Success! Compiled 35 modules.                                       
Successfully generated /dev/null

real	0m11.188s
user	0m20.192s
sys	0m6.727s

System details:

Mac mini (Late 2014)
2,6 GHz Intel Core i5
8 GB 1600 MHz DDR3
Samsung SSD 850 PRO 512GB

@rl-king
Copy link

rl-king commented Sep 11, 2017

Realworld Elm Spa Example

Cold

rlking:elm-spa-example rlking$ time elm-make src/Main.elm --output /dev/null
Success! Compiled 93 modules.                                       
Successfully generated /dev/null

real	0m10.422s
user	0m12.749s
sys	0m1.443s

After one variable change in Main.elm

rlking:elm-spa-example rlking$ time elm-make src/Main.elm --output /dev/null
Success! Compiled 1 module.                                         
Successfully generated /dev/null

real	0m0.564s
user	0m0.620s
sys	0m0.127s

Private Repo

Cold

rlking:Web Type Composer rlking$ time elm-make src/Main.elm --output /dev/null
Success! Compiled 86 modules.                                       
Successfully generated /dev/null

real	0m15.343s
user	0m18.153s
sys	0m2.072s

After one variable change in Main.elm

rlking:Web Type Composer rlking$ time elm-make src/Main.elm --output /dev/null
Success! Compiled 1 module.                                         
Successfully generated /dev/null

real	0m0.590s
user	0m0.694s
sys	0m0.151s

Cloc & system

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                             10            233             20            765
-------------------------------------------------------------------------------
SUM:                            10            233             20            765
-------------------------------------------------------------------------------
MacBook Pro late 2008
2,8 GHz Intel Core 2 Duo
8 GB 1067 MHz DDR3
SSD

@etaque
Copy link

etaque commented Sep 11, 2017

https://github.com/etaque/tacks (SPA + game)

Cold

➜  tacks git:(master) time elm-make client/src/Main.elm
Success! Compiled 206 modules.
Successfully generated index.html
elm-make client/src/Main.elm  109,75s user 100,70s system 477% cpu 44,064 total

Incremental

(just added a variable in Main.elm)

➜  tacks git:(master) time elm-make client/src/Main.elm
Success! Compiled 1 module.
Successfully generated index.html
elm-make client/src/Main.elm  10,06s user 6,73s system 531% cpu 3,158 total

About

➜  tacks git:(master) cloc client/src/
     117 text files.
     117 unique files.
       1 file ignored.

github.com/AlDanial/cloc v 1.74  T=0.38 s (304.3 files/s, 29843.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                            116           2343             52           8980
-------------------------------------------------------------------------------
SUM:                           116           2343             52           8980
-------------------------------------------------------------------------------
MBP 15' Core i7 2.2Ghz (2015)
16 Go 1600 MHz DDR3
SSD

@lucamug
Copy link

lucamug commented Sep 11, 2017

Clean build for (for reference) https://github.com/rtfeldman/elm-spa-example

real    0m9.415s
user   0m14.593s
sys     0m5.197s

Private repo

Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                             70           1161            569           4838
Sass                            59            795            149           3118
HTML                             4            142             30           2388
JavaScript                       5             48            128            356
JSON                             1              0              0             21
-------------------------------------------------------------------------------
SUM:                           139           2146            876          10721
-------------------------------------------------------------------------------

Clean build

Success! Compiled 160 modules.                                      
Successfully generated index.html

real   0m29.301s
user   0m47.766s
sys    0m18.245s

System details

MacBook Pro (Retina, 13-inch, Early 2015)
Processor 2,7 GHz Intel Core i5
Memory 8 GB 1867 MHz DDR3

Spreadsheet report: https://docs.google.com/spreadsheets/d/17Wz_ayqNkWRM7gNx-GHqnNKv5GCBZ4kAOh3rPnmI0W4/edit

@mordrax
Copy link

mordrax commented Sep 11, 2017

castle of the winds

Clean build

Success! Compiled 191 modules.                                      
Successfully generated /dev/null

real	0m49.153s
user	1m10.988s
sys	0m39.952s

Clean with 1 cpu

mordrax@mordrax-desktop ~/code/cotwelm (master) $ time sysconfcpus -n 1 elm make src/main.elm --output /dev/null
Success! Compiled 191 modules.                                      
Successfully generated /dev/null

real	0m47.801s
user	0m47.236s
sys	0m0.628s

Incremental ( touching main.elm )

Success! Compiled 1 module.                                         
Successfully generated /dev/null

real	0m2.606s
user	0m3.808s
sys	0m3.268s

Incremental with one cpu

mordrax@mordrax-desktop ~/code/cotwelm (master) $ time sysconfcpus -n 1 elm make src/main.elm --output /dev/null
Success! Compiled 1 module.                                         
Successfully generated /dev/null

real	0m2.856s
user	0m2.660s
sys	0m0.196s

Files

Around 7000 lines of code is a text literal. Removing it made no difference to the numbers above ie, read as 11k LoC

      84 text files.
      84 unique files.                              
       0 files ignored.

github.com/AlDanial/cloc v 1.70  T=0.22 s (390.1 files/s, 105163.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                             84           3580            900          18162
-------------------------------------------------------------------------------
SUM:                            84           3580            900          18162
-------------------------------------------------------------------------------

System details

Memory: 8GB
Processor: Intel® Core™ i5-2500K CPU @ 3.30GHz × 4 
SSD
Ubuntu 16.04 LTS

@opsb
Copy link

opsb commented Sep 11, 2017

Zapnito Feeds

Clean build

Success! Compiled 317 modules.
Successfully generated index.html

real    1m24.979s
user    3m54.013s
sys 2m46.621s

Incremental ( touching main.elm )

Success! Compiled 1 module.
Successfully generated index.html

real    0m3.495s
user    0m6.649s
sys 0m5.088s

Incremental ( touching a heavily used leaf module - likely worst case scenario in this project)

Success! Compiled 44 modules.
Successfully generated index.html

real    0m39.119s
user    1m14.236s
sys 0m57.832s

Files

     184 text files.
     183 unique files.
      11 files ignored.

github.com/AlDanial/cloc v 1.72  T=0.64 s (272.4 files/s, 30478.3 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                            146           3982             92          14279
JavaScript                      19            134              4            660
Sass                             6             20              3            136
HTML                             1              1              0             40
JSON                             1              0              0              8
-------------------------------------------------------------------------------
SUM:                           173           4137             99          15123
-------------------------------------------------------------------------------

System details

Memory: 16GB
Processor: 2.9 GHz Intel Core i7 (4 cores, L2 256KB, L3 8MB)
SSD: APPLE SSD SM0512L

@jinjor
Copy link

jinjor commented Sep 11, 2017

https://github.com/WorksApplications/office-maker-client

Clean build

torii-mac:office-maker-client jinjor$ time elm-make src/elm/Page/Map/Main.elm --output=/dev/null
Success! Compiled 149 modules.                                      
Successfully generated /dev/null

real	0m36.113s
user	1m3.242s
sys	0m25.020s

Incremental (touch Main.elm)

torii-mac:office-maker-client jinjor$ touch src/elm/Page/Map/Main.elm
torii-mac:office-maker-client jinjor$ time elm-make src/elm/Page/Map/Main.elm --output=/dev/null
Success! Compiled 1 module.                                         
Successfully generated /dev/null

real	0m1.703s
user	0m2.581s
sys	0m1.163s

Incremental (touch CoreType.elm - worst case)

torii-mac:office-maker-client jinjor$ touch src/elm/CoreType.elm 
torii-mac:office-maker-client jinjor$ time elm-make src/elm/Page/Map/Main.elm --output=/dev/null
Success! Compiled 57 modules.                                       
Successfully generated /dev/null

real	0m23.494s
user	0m46.716s
sys	0m17.295s

Files

torii-mac:office-maker-client jinjor$ cloc .
     117 text files.
     117 unique files.                                          
       3 files ignored.

github.com/AlDanial/cloc v 1.72  T=0.69 s (166.0 files/s, 27504.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                             93           3767            925          13422
JavaScript                      10             41             19            390
HTML                             3             13              0            197
JSON                             4              0              0             95
Markdown                         1             30              0             61
CSS                              1             13              1             53
Bourne Shell                     2              3              4             13
YAML                             1              0              0              9
-------------------------------------------------------------------------------
SUM:                           115           3867            949          14240
-------------------------------------------------------------------------------

System details

MacBook Air (13-inch, Mid 2012)
Processor 1.8 GHz Intel Core i5
Memory 4 GB 1600 MHz DDR3

@julianjelfs
Copy link

julianjelfs commented Sep 14, 2017

This is the state of affairs after doing our best to refactor things. I have reduced the module count by about 100 and that has helped (but it was pretty painful and clearly the module count will increase again as the codebase grows).

Build from scratch

time elm-make client/elm/Main.elm --output=/dev/null
Success! Compiled 297 modules.
Successfully generated /dev/null

real	2m3.696s
user	3m27.396s
sys	2m21.232s

Build after touching Main.elm

time elm-make client/elm/Main.elm --output=/dev/null
Success! Compiled 1 module.
Successfully generated /dev/null

real	0m4.740s
user	0m8.336s
sys	0m4.944s

Build after touching most imported module (seems to be worst case for incremental)

time elm-make client/elm/Main.elm --output=/dev/null
Success! Compiled 103 module.
Successfully generated /dev/null

real	1m37.820s
user	2m43.580s
sys	1m54.716s
cloc client\elm
     160 text files.
     160 unique files.
      11 files ignored.

github.com/AlDanial/cloc v 1.70  T=18.87 s (8.5 files/s, 1936.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                            158           5858            271          30366
JavaScript                       2              4              0             42
-------------------------------------------------------------------------------
SUM:                           160           5862            271          30408
-------------------------------------------------------------------------------

Despite trying to capture the best and worst case like this, we also see compile times much longer than this quite regularly but I cannot spot any pattern.

Note that we actually use windows. I have compiled these stats on a linux vm just to get consistency with others. The times are, however, quite representative with what we see on windows using elm-gulp as well.

@mordrax
Copy link

mordrax commented Sep 14, 2017

SPA at work. I'm leading the frontend on this rewrite.

Builds

$ rm -rf elm-stuff/build-artifacts/
$ time sysconfcpus -n 1 elm make src/Main.elm --output /dev/null
Success! Compiled 349 modules.                                      
Successfully generated /dev/null

real	3m38.054s
user	3m34.868s
sys	0m3.492s


$ touch src/Main.elm 
$ time sysconfcpus -n 1 elm make src/Main.elm --output /dev/null
Success! Compiled 1 module.                                         
Successfully generated /dev/null

real	0m6.433s
user	0m6.048s
sys	0m0.376s

Typical incremental build

$ touch src/View/Quotation.elm 
$ time sysconfcpus -n 1 elm make src/Main.elm --output /dev/null
Success! Compiled 75 modules.                                       
Successfully generated /dev/null

real	2m24.808s
user	2m24.296s
sys	0m0.712s

Same build using the js hack

$ touch src/View/Quotation.elm 
$ time ./hack.sh src/View/Quotation.elm 
Processing file ./src/View/Quotation.elm
Success! Compiled 1 module.                                         
Successfully generated /dev/null
_user\$project\$View_Quotation\$  FIRSTLINE:57090  LASTLINE:58746  LASTFUNCTIONSIZE:28  LAST:58720

real	0m1.236s
user	0m1.640s
sys	0m0.932s

Files

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JavaScript                       3           1311            231          80986
Elm                            289          10357           1030          34461
CSS                              8            349            236           4295
HTML                            14            321             29           2318
SASS                            14             34             34           1768
LESS                            14             34             44           1758
Markdown                         2              5              0             19
-------------------------------------------------------------------------------
SUM:                           344          12411           1604         125605
-------------------------------------------------------------------------------

System details

Memory: 8GB
Processor: Intel® Core™ i5-2500K CPU @ 3.30GHz × 4 
256gb SSD
Ubuntu 16.04 LTS

@joefiorini
Copy link

joefiorini commented Feb 13, 2018

Repo: https://github.com/joefiorini/flittal/tree/getting-running

just upgraded to 0.18 from 0.14.

Clean build

Including packages in case that helps.

⊕ time elm-make src/Main.elm --output /dev/null
Some new packages are needed. Here is the upgrade plan.

  Install:
    elm-community/lazy-list 1.0.0
    elm-community/list-extra 7.1.0
    elm-community/random-extra 2.0.0
    elm-community/shrink 2.0.0
    elm-community/undo-redo 2.0.0
    elm-lang/core 5.1.1
    elm-lang/dom 1.1.1
    elm-lang/html 2.0.0
    elm-lang/keyboard 1.0.1
    elm-lang/lazy 2.0.0
    elm-lang/navigation 2.1.0
    elm-lang/virtual-dom 2.0.4
    evancz/elm-markdown 3.0.2
    ohanhi/keyboard-extra 3.0.4

Do you approve of this plan? [Y/n] y
Starting downloads...

  ● elm-community/lazy-list 1.0.0
  ● elm-community/shrink 2.0.0
  ● elm-community/random-extra 2.0.0
  ● elm-lang/core 5.1.1
  ● elm-lang/lazy 2.0.0
  ● evancz/elm-markdown 3.0.2
  ● elm-lang/keyboard 1.0.1
  ● elm-lang/dom 1.1.1
  ● elm-community/list-extra 7.1.0
  ● elm-community/undo-redo 2.0.0
  ● elm-lang/navigation 2.1.0
  ● elm-lang/html 2.0.0
  ● elm-lang/virtual-dom 2.0.4
  ● ohanhi/keyboard-extra
3.0.4
Packages configured successfully!
Success! Compiled 91 modules.
Successfully generated /dev/null
      263.97 real       273.47 user        17.09 sys

Other info

⊕ cloc src
      50 text files.
      50 unique files.
       4 files ignored.

github.com/AlDanial/cloc v 1.76  T=1.04 s (44.1 files/s, 3528.9 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Elm                             28            600            174           2200
Sass                            14             54              7            316
HTML                             1             41              0            166
JavaScript                       3             25              0             95
-------------------------------------------------------------------------------
SUM:                            46            720            181           2777
-------------------------------------------------------------------------------
⊕ elm-make src/Main.elm +RTS -s -RTS

Packages configured successfully!
Success! Compiled 91 modules.
Successfully generated index.html
 105,196,830,936 bytes allocated in the heap
   3,421,676,984 bytes copied during GC
      52,436,664 bytes maximum residency (255 sample(s))
       1,896,960 bytes maximum slop
             116 MB total memory in use (0 MB lost due to fragmentation)

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0     201877 colls, 201877 par   34.077s  14.806s     0.0001s    0.0587s
  Gen  1       255 colls,   254 par    4.214s   1.462s     0.0057s    0.1438s

  Parallel GC work balance: 13.94% (serial 0%, perfect 100%)

  TASKS: 15 (1 bound, 14 peak workers (14 total), using -N4)

  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

  INIT    time    0.000s  (  0.001s elapsed)
  MUT     time  242.428s  (251.092s elapsed)
  GC      time   38.291s  ( 16.269s elapsed)
  EXIT    time    0.001s  (  0.002s elapsed)
  Total   time  280.721s  (267.364s elapsed)

  Alloc rate    433,930,885 bytes per MUT second

  Productivity  86.4% of total user, 90.7% of total elapsed

gc_alloc_block_sync: 798392
whitehole_spin: 0
gen[0].sync: 420
gen[1].sync: 103944

@smucode
Copy link

smucode commented Apr 20, 2018

tl;dr

Types RTS Opts Compile time Artifacts size
Yes -A512M -H128M -n8m 3m7s 91M
Yes -s 6m14s 93M
No -A512M -H128M -n8m 1m22s 13M

For the last one I removed all type declarations apart from our main function. I also had to remove a few files as I kept running into an issue with the type inference algorithm of elm-make: Unable to generalize a type variable, it is unranked.

cloc

$ cloc .
     325 text files.
     324 unique files.                                          
      25 files ignored.

github.com/AlDanial/cloc v 1.76  T=1.05 s (284.6 files/s, 158321.8 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JavaScript                       2              5              8         118011
Elm                            198           6549            708          22933
CSS                             16            372             80           6680
Sass                            55            743             66           5384
HTML                            12            351              2           2971
LESS                            17             61             67           1896
-------------------------------------------------------------------------------
SUM:                           300           8081            931         157875
-------------------------------------------------------------------------------

With +RTS -A512M -H128M -n8m -RTS, 3m7s, 91M build artifacts

$  rm -r elm-stuff && elm-package install --yes
Starting downloads...

  ● NoRedInk/elm-decode-pipeline 3.0.0
  ● Zinggi/elm-webgl-math 1.0.6
  ● alpacaaa/elm-date-distance 1.1.0
  ● Skinney/murmur3 2.0.6
  ● avh4/elm-fifo 1.0.3
  ● elm-community/dict-extra 2.3.0
  ● elm-community/intdict 2.1.0
  ● elm-community/graph 4.1.0
  ● elm-community/list-extra 6.1.0
  ● elm-community/string-extra 1.4.0
  ● elm-lang/animation-frame 1.0.1
  ● elm-lang/core 5.1.1
  ● elm-lang/http 1.0.0
  ● elm-lang/html 2.0.0
  ● elm-lang/dom 1.1.1
  ● elm-lang/mouse 1.0.1
  ● elm-lang/navigation 2.1.0
  ● elm-lang/svg 2.0.0
  ● elm-lang/virtual-dom 2.0.4
  ● elm-lang/trampoline 1.0.1
  ● elm-lang/window 1.0.1
  ● elm-tools/parser 2.0.1
  ● elm-tools/parser-primitives 1.0.0
  ● eskimoblood/elm-color-extra 5.1.0
  ● evancz/url-parser 2.0.1
  ● folkertdev/elm-deque 2.0.0
  ● folkertdev/one-true-path-experiment 3.0.2
  ● folkertdev/svg-path-lowlevel 1.0.1
  ● fredcy/elm-parseint 2.0.0
  ● justinmimbs/elm-date-extra 2.1.1
  ● klaftertief/elm-heatmap 1.0.0
  ● jweir/elm-iso8601 3.0.2
  ● krisajenkins/elm-exts 27.4.0
  ● krisajenkins/remotedata 4.4.0
  ● mdgriffith/elm-style-animation 3.5.5
  ● mgold/elm-geojson 2.0.0
  ● mdgriffith/style-elements 4.3.0
  ● opensolid/geometry 2.1.0
  ● gampleman/elm-visualization 1.6.1
  ● supermario/elm-countries 1.0.2
  ● rtfeldman/hex 1.0.0

Packages configured successfully!

$ time elm-make +RTS -A512M -H128M -n8m -RTS src/elm/Main.elm --output /dev/null
Success! Compiled 447 modules.                                      
Successfully generated /dev/null

real	3m7.904s
user	4m5.909s
sys	0m43.891s

$ du -h elm-stuff/build-artifacts/0.18.0/foo/bar/
 91M	elm-stuff/build-artifacts/0.18.0/foo/bar//1.0.0
 91M	elm-stuff/build-artifacts/0.18.0/foo/bar/

With +RTS -s -RTS, 6m14s , 93M build artifacts

$ rm -r elm-stuff && elm-package install --yes
Starting downloads...

# (same packages...)

Packages configured successfully!

$ time elm-make +RTS -s -RTS src/elm/Main.elm --output /dev/null
Success! Compiled 447 modules.                                      
Successfully generated /dev/null
 242,122,653,200 bytes allocated in the heap
 181,639,551,480 bytes copied during GC
     718,209,888 bytes maximum residency (1003 sample(s))
      20,109,768 bytes maximum slop
            1978 MB total memory in use (0 MB lost due to fragmentation)

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0     461437 colls, 461436 par   944.174s  204.093s     0.0004s    0.0784s
  Gen  1      1003 colls,  1003 par   216.620s  36.564s     0.0365s    0.5996s

  Parallel GC work balance: 8.37% (serial 0%, perfect 100%)

  TASKS: 18 (1 bound, 17 peak workers (17 total), using -N8)

  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

  INIT    time    0.001s  (  0.001s elapsed)
  MUT     time  213.269s  (133.163s elapsed)
  GC      time  1160.794s  (240.657s elapsed)
  EXIT    time    0.000s  (  0.000s elapsed)
  Total   time  1374.066s  (373.822s elapsed)

  Alloc rate    1,135,291,776 bytes per MUT second

  Productivity  15.5% of total user, 57.1% of total elapsed

gc_alloc_block_sync: 13854752
whitehole_spin: 0
gen[0].sync: 356
gen[1].sync: 9277665

real	6m14.021s
user	22m54.066s
sys	7m53.766s

$ du -h elm-stuff/build-artifacts/0.18.0/foo/bar/
 93M	elm-stuff/build-artifacts/0.18.0/foo/bar//1.0.0
 93M	elm-stuff/build-artifacts/0.18.0/foo/bar/

Types removed, with +RTS -A512M -H128M -n8m -RTS, 1m22s , 13M build artifacts

$  rm -r elm-stuff && elm-package install --yes
Starting downloads...

# (same packages...)

Packages configured successfully!

$ time elm-make +RTS -A512M -H128M -n8m -RTS src/elm/Main.elm --output /dev/null
Success! Compiled 443 modules.                                      
Successfully generated /dev/null

real	1m31.936s
user	1m22.255s
sys	0m11.761s

$ du -h elm-stuff/build-artifacts/0.18.0/foo/bar/
 13M	elm-stuff/build-artifacts/0.18.0/foo/bar//1.0.0
 13M	elm-stuff/build-artifacts/0.18.0/foo/bar/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment