[GHC] #16324: ghc-pkg: Batched package unregister takes time linear to the batch size

GHC ghc-devs at haskell.org
Fri Feb 15 10:16:52 UTC 2019


#16324: ghc-pkg: Batched package unregister takes time linear to the batch size
-------------------------------------+-------------------------------------
           Reporter:  qrilka         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 When started using batched `ghc-pkg unregister` (implemented in #12637) we
 have noticed that it did not give much time speed improvements. I've
 created a simple reproduction of that behavior in
 https://github.com/qrilka/pkg-db-problems (which is a bit of package db
 abuse of cause as the same package gets registered multiple times with
 different ids). The last run of that script gave me:

 {{{

 qrilka at qdesktop ~/ws/h/pkg-db-problems $ ./test.sh
 Up to date
 Reading package info from "dist-
 newstyle/packagedb/ghc-8.6.3/sample-1.0.0-inplace.conf" ... done.
 sample-1.0.0: Warning: haddock-interfaces: /home/qrilka/ws/h/pkg-db-
 problems/dist-
 newstyle/build/x86_64-linux/ghc-8.6.3/sample-1.0.0/doc/html/sample/sample.haddock
 doesn't exist or isn't a file
 sample-1.0.0: Warning: haddock-html: /home/qrilka/ws/h/pkg-db-problems
 /dist-newstyle/build/x86_64-linux/ghc-8.6.3/sample-1.0.0/doc/html/sample
 doesn't exist or isn't a directory
 Unregistering single package:

 real    0m0,196s
 user    0m0,175s
 sys     0m0,020s
 Unregistering 15 packages:

 real    0m2,471s
 user    0m2,340s
 sys     0m0,130s
 }}}

 Which clearly shows speed problems.

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


More information about the ghc-tickets mailing list