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

Avoid excessive retypechecking of TH codebases #673

Merged
merged 7 commits into from
Jul 1, 2020

Conversation

pepeiborra
Copy link
Collaborator

This PR follows the plan outlined in #660 including tests.

Our current benchmark example (Cabal) doesn't include any example of TH, so the only thing visible in the benchmark results is that things do not regress too much:

version name success samples startup setup experiment maxResidency
upstream code actions True 100 10.000944527000001 0.59697904 0.68091352 196MB
HEAD code actions True 100 9.981281715000001 0.9265053580000001 0.905302617 204MB
upstream code actions after edit True 100 9.870548535000001 0.0 29.209360251000003 197MB
HEAD code actions after edit True 100 10.058724974 0.0 31.147682330000002 205MB
upstream completions after edit True 100 10.079300106 0.0 38.186949398 173MB
HEAD completions after edit True 100 10.005696135 0.0 41.423665788 183MB
upstream documentSymbols after edit True 100 9.973052604000001 0.0 4.571069307 170MB
HEAD documentSymbols after edit True 100 10.009694254000001 0.0 4.464170808 170MB
upstream edit True 100 10.684809285 0.0 27.757133392 168MB
HEAD edit True 100 10.892325944000001 0.0 29.814292458 172MB
upstream getDefinition True 100 10.52725915 0.0 0.8384268300000001 172MB
HEAD getDefinition True 100 11.522601252000001 0.0 0.8449014170000001 171MB
upstream hover True 100 10.000964431 0.0 0.441070864 170MB
HEAD hover True 100 9.916935132 0.0 0.48269071300000005 171MB
upstream hover after edit True 100 10.222695908 0.0 35.27605837 170MB
HEAD hover after edit True 100 10.497113535 0.0 38.391144658 178MB

Full results in https://github.com/pepeiborra/ghcide/tree/TH-benchmarks/bench-hist

I also noticed that TH reloading is not happening when not using interface files, that is, when the TH is in a file of interest. Raised #672 and included a failing test here.

Copy link
Collaborator

@cocreature cocreature left a comment

Choose a reason for hiding this comment

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

Thanks!

test/exe/Main.hs Outdated Show resolved Hide resolved
Co-authored-by: Moritz Kiefer <[email protected]>
@cocreature cocreature merged commit cdfc4b6 into haskell:master Jul 1, 2020
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Hi file stability

* fix missing early cutoff in GetModIface

* tests for TH reloading

* Do not run hlint on test/data

* hlints

* Fix legacy code path

* Update test/exe/Main.hs

Co-authored-by: Moritz Kiefer <[email protected]>

Co-authored-by: Moritz Kiefer <[email protected]>
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Hi file stability

* fix missing early cutoff in GetModIface

* tests for TH reloading

* Do not run hlint on test/data

* hlints

* Fix legacy code path

* Update test/exe/Main.hs

Co-authored-by: Moritz Kiefer <[email protected]>

Co-authored-by: Moritz Kiefer <[email protected]>
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Hi file stability

* fix missing early cutoff in GetModIface

* tests for TH reloading

* Do not run hlint on test/data

* hlints

* Fix legacy code path

* Update test/exe/Main.hs

Co-authored-by: Moritz Kiefer <[email protected]>

Co-authored-by: Moritz Kiefer <[email protected]>
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.

2 participants