[GHC] #15938: Hadrian's recompilation check is extremely slow

GHC ghc-devs at haskell.org
Fri Nov 30 00:08:06 UTC 2018


#15938: Hadrian's recompilation check is extremely slow
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.8.1
       Component:  Build System      |              Version:  8.6.2
  (Hadrian)                          |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 I suspect to really solve this changes in Shake will be necessary. On
 quickly looking at the implementation a few things stood out:

  * paths are split on the directory separator every time we attempt to
 match it against a `FilePattern`. This is apparently how we end up with
 180 million calls to `split`.
  * paths are represented as `ByteString`. Given the storage overhead and
 pinned nature of `ByteString`, I suspect there is a small amount of money
 on the table here

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15938#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list