[Hackage] #288: the package indexes are very slow

#288: the package indexes are very slow ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Keywords: Difficulty: hard (< 1 day) | Ghcversion: 6.8.2 Platform: | ---------------------------------+------------------------------------------ In a large run, eg trying to make a plan to install 560 packages from hackage: {{{ $ cabal install --dry-run $(cat pkgs) }}} it turns out (according to the ghc profile), 91% of the time is spent reading the index of installed and available packages. The ghc package index is a couple of massive text files in `Read/Show` format so that takes for ever to read. The available package index is the tarball of .cabal files and our .cabal file parser is really slow. For smaller runs it's not so bad: {{{ $ cabal install --dry-run xmonad }}} since we only have to inspect the subset of the available package index that make up xmonad's transitive deps (any versions thereof), so that allows us to avoid forcing most of the index. http://hackage.haskell.org/trac/ghc/ticket/2089 might help us, but then again maybe not if we still have to parse the result of calling ghc-pkg since that will give us another text format. For our own package index, perhaps we should be generating a cache in some other format when we download the package index. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/288 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#288: the package indexes are very slow
---------------------------------+------------------------------------------
Reporter: duncan | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.2.3.0
Severity: normal | Resolution:
Keywords: | Difficulty: hard (< 1 day)
Ghcversion: 6.8.2 | Platform:
---------------------------------+------------------------------------------
Comment (by duncan):
Partially fixed for common cases with:
{{{
Sat Jun 7 15:39:13 BST 2008 Duncan Coutts

#288: the package indexes are very slow ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: easy (<4 hours) Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * difficulty: hard (< 1 day) => easy (<4 hours) * version: 1.2.3.0 => HEAD Comment: For installed packages index, we should parse the output of `ghc-pkg dump` lazily. See #311. All it needs is to split on `"\n---"` as we do now, but then instead of directly parsing, we should extract only the name and version fields and then parse the rest lazily. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/288#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage