Skip to content

Storing dependencies contributes significantly to memory usage #2963

Open
@mpickering

Description

@mpickering

I ran a profile after loading GHC into HLS and see that many of the large sources of allocation are due to to big lists of keys.

Total: 1.8 million allocated key values for 90MB (10%) of live data

hls-graph-1.7.0.0-inplace:Development.IDE.Graph.Internal.Types:Key:89794800:1870725:48:48.0

1.4 million, 34MB of lists containing keys

ghc-prim:GHC.Types::[hls-graph-1.7.0.0-inplace:Development.IDE.Graph.Internal.Types:Key,ghc-prim:GHC.Types::]:34671936:1444664:24:24.0

1.2 million, 29MB of the GetModSummaryWithoutTimestamps Key

ghc-prim:GHC.Tuple:(,)[ghcide-1.7.0.1-inplace:Development.IDE.Core.RuleTypes:GetModSummaryWithoutTimestamps,lsp-types-1.4.0.1-bc66547fb74f5fe287e9850a7cf5b08fad3aa0baf55d7ffc8b91807e767ee251:Language.LSP.Types.Uri:NormalizedFilePath]:29105232:1212718:24:24.0

Metadata

Metadata

Assignees

Labels

performanceIssues about memory consumption, responsiveness, etc.type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions