Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Conversation

@pepeiborra
Copy link
Collaborator

It was appending lists of identifiers without pruning duplicates

Fixes #771

image

pepeiborra@pepeiborra-mbp w1 % column -t -s , bench-hist/results.csv
version    name                         success   samples   startup              setup                experiment           maxResidency
upstream   hover                        True      100       10.822233228         0.0                  2.436788999          582MB
upstream   edit                         True      100       9.478771113          0.0                  35.664150921         600MB
upstream   getDefinition                True      100       9.838020262          0.0                  2.5956575830000004   587MB
upstream   hover after edit             True      100       11.241869796000001   0.0                  5.150880557000001    566MB
upstream   completions after edit       True      100       10.113484234000001   0.0                  10.774867441000001   472MB
upstream   code actions                 True      100       10.635542301000001   4.162216031          0.527846514          552MB
upstream   code actions after edit      True      100       10.098725835         0.0                  25.293623039         545MB
upstream   documentSymbols after edit   True      100       16.169403093         0.0                  5.21765379           276MB
HEAD       hover                        True      100       9.445237065          0.0                  1.800860836          223MB
HEAD       edit                         True      100       9.710649867          0.0                  33.898333637         204MB
HEAD       getDefinition                True      100       9.380904548          0.0                  1.9576130440000001   222MB
HEAD       hover after edit             True      100       9.768509064          0.0                  4.9657159680000005   191MB
HEAD       completions after edit       True      100       9.609953897          0.0                  9.033533009000001    223MB
HEAD       code actions                 True      100       9.570470244000001    2.6726778230000003   1.4915889900000001   238MB
HEAD       code actions after edit      True      100       9.359972777000001    0.0                  21.629622857         237MB
HEAD       documentSymbols after edit   True      100       9.768980766          0.0                  4.321581539          182MB

It was appending lists of identifiers without pruning duplicates
Copy link
Collaborator

@ndmitchell ndmitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix!

extras <- getShakeExtras
let !exportsMap' = createExportsMap $ mapMaybe (fmap hirModIface) modIfaces
liftIO $ modifyVar_ (exportsMap extras) $ return . (exportsMap' <>)
liftIO $ modifyVar_ (exportsMap extras) $ evaluate . (exportsMap' <>)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely! We should probably add an HLint rule for this - or wrap modifyVar_ into modifyVar_' and only use those.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An hlint rule would be great

@pepeiborra pepeiborra merged commit ed95e69 into haskell:master Sep 6, 2020
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
It was appending lists of identifiers without pruning duplicates
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
It was appending lists of identifiers without pruning duplicates
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
It was appending lists of identifiers without pruning duplicates
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Space leak

2 participants