Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20825
Closed
Open
Created Dec 15, 2021 by Matthew Pickering@mpickeringDeveloper

Core lint can dominate compile times

As determined in #20736 (closed) the reason for the long compile times in GHCi.Message was due to core lint.

With core lint:

  65,991,211,184 bytes allocated in the heap
   3,939,647,480 bytes copied during GC
     263,766,640 bytes maximum residency (13 sample(s))
       3,624,336 bytes maximum slop
             718 MiB total memory in use (0 MB lost due to fragmentation)

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0      1260 colls,     0 par   15.580s  15.602s     0.0124s    0.1712s
  Gen  1        13 colls,     0 par    5.657s   5.854s     0.4503s    1.0147s

  TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1)

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

  INIT    time    0.036s  (  0.040s elapsed)
  MUT     time   51.227s  ( 52.204s elapsed)
  GC      time   21.236s  ( 21.455s elapsed)
  EXIT    time    0.001s  (  0.001s elapsed)
  Total   time   72.500s  ( 73.700s elapsed)

Without core lint

 15,660,009,440 bytes allocated in the heap
   3,199,285,712 bytes copied during GC
     229,501,880 bytes maximum residency (12 sample(s))
       3,462,216 bytes maximum slop
             654 MiB total memory in use (0 MB lost due to fragmentation)

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0       414 colls,     0 par   10.152s  10.153s     0.0245s    0.1526s
  Gen  1        12 colls,     0 par    4.635s   4.635s     0.3862s    0.8169s

  TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1)

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

  INIT    time    0.008s  (  0.008s elapsed)
  MUT     time   16.172s  ( 16.979s elapsed)
  GC      time   14.787s  ( 14.788s elapsed)
  EXIT    time    0.001s  (  0.005s elapsed)
  Total   time   30.969s  ( 31.780s elapsed)

  Alloc rate    968,322,075 bytes per MUT second

  Productivity  52.2% of total user, 53.4% of total elapsed

  Alloc rate    1,288,202,870 bytes per MUT second

  Productivity  70.7% of total user, 70.8% of total elapsed

Given that we run core lint on every CI pipeline, it stands to reason that we could reduce CI times in half by disabling core lint. Therefore we could greatly benefit from speeding it up.

Edited Dec 15, 2021 by Matthew Pickering
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking