Skip to content

cabal uses too much memory when solving for setup dependencies #2899

@sebright

Description

@sebright

Some combinations of setup and library dependencies cause the solver to use more and more memory. I ran cabal install --dry-run --max-backjumps -1 with this cabal file for five minutes with about 16GB of memory. I used GHC 7.10.2.

name:                example
version:             0.1.0.0
cabal-version:       >=1.8
build-type:          Custom

custom-setup
  setup-depends:       aeson, hackage-server, yi

library
  build-depends:       aeson, mtl, leksah

cabal-memory-usage

My best guess is that it is related to the addLinking function creating linked nodes from existing unlinked nodes. When a node is referenced by a later sibling, it probably isn't garbage collected immediately after it is traversed.

return $ PChoice qpn gr (cs' `P.union` P.fromList newCs)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions