Commit 9effc56
Share ModuleGraphs for all files (#3232)
* Remove GetDependencyInformation in favour of GetModuleGraph.
Computing and storing GetDependencyInformation for each file essentially individually means
that we perform downsweep on each file individually, wasting a lot of work and using an excessive
amount of memory to store all these duplicated graphs individually.
However, we already have the `GetModuleGraph` rule, which we need to compute before compiling
files any way due to being depended on by `NeedsCompilation`, which needs to know if any reverse
dependencies of the module we are compiling requires TH, which meant that each file already depends on
the results of downsweep for the whole project.
Instead, we can compute the whole graph once when we execute the `GetModuleGraph` rule and even use this inside `HscEnv.hsc_mod_graph` to avoid reconstructing the `ModuleGraph` on each invocation of `GhcSessionDeps`.
There may be concerns about excessive build churn due to any change to the result of `GetModuleGraph`
invalidating the result of `GhcSessionDeps` too often, but note that this only happens when something
in the header of a module changes, and this could be solved easily be re-introducing
a version of `GetDependencyInformation` with early cutoff that essentially returns the result of `GetModuleGraph`
but includes the hash of only the `ModSummary`s in the downward dependency closure of the file.
* module graph early cutoff
early cutoff for eval plugin
* allow running benchmarks on examples generated via a script
* Add new benchmarks to config
* Allow pathToId to fail
* Errors
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>1 parent 202295b commit 9effc56
File tree
13 files changed
+363
-164
lines changed- bench
- ghcide-bench/src
- Experiments
- ghcide/src/Development/IDE
- Core
- GHC
- Import
- plugins/hls-eval-plugin
- src/Ide/Plugin/Eval
13 files changed
+363
-164
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
36 | 80 | | |
37 | 81 | | |
38 | 82 | | |
| |||
47 | 91 | | |
48 | 92 | | |
49 | 93 | | |
| 94 | + | |
50 | 95 | | |
51 | 96 | | |
52 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
| |||
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
115 | 131 | | |
116 | 132 | | |
117 | 133 | | |
| |||
276 | 292 | | |
277 | 293 | | |
278 | 294 | | |
279 | | - | |
280 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
281 | 298 | | |
282 | 299 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
288 | 305 | | |
289 | 306 | | |
290 | 307 | | |
| 308 | + | |
291 | 309 | | |
292 | 310 | | |
293 | 311 | | |
294 | 312 | | |
295 | | - | |
| 313 | + | |
| 314 | + | |
296 | 315 | | |
297 | 316 | | |
298 | 317 | | |
| |||
581 | 600 | | |
582 | 601 | | |
583 | 602 | | |
584 | | - | |
| 603 | + | |
585 | 604 | | |
586 | 605 | | |
587 | 606 | | |
588 | 607 | | |
589 | 608 | | |
590 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
591 | 622 | | |
592 | 623 | | |
593 | 624 | | |
| |||
633 | 664 | | |
634 | 665 | | |
635 | 666 | | |
636 | | - | |
637 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
638 | 670 | | |
639 | 671 | | |
640 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| |||
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
58 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
59 | 71 | | |
60 | 72 | | |
61 | 73 | | |
62 | 74 | | |
63 | | - | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
67 | | - | |
| 79 | + | |
68 | 80 | | |
69 | 81 | | |
| 82 | + | |
70 | 83 | | |
71 | 84 | | |
72 | 85 | | |
73 | 86 | | |
74 | | - | |
| 87 | + | |
75 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
76 | 99 | | |
77 | 100 | | |
78 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
1052 | 1053 | | |
1053 | 1054 | | |
1054 | 1055 | | |
| 1056 | + | |
| 1057 | + | |
1055 | 1058 | | |
1056 | | - | |
1057 | | - | |
1058 | 1059 | | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | 1062 | | |
1068 | | - | |
| 1063 | + | |
1069 | 1064 | | |
1070 | 1065 | | |
1071 | 1066 | | |
1072 | | - | |
1073 | | - | |
| 1067 | + | |
| 1068 | + | |
1074 | 1069 | | |
1075 | 1070 | | |
1076 | 1071 | | |
| |||
1096 | 1091 | | |
1097 | 1092 | | |
1098 | 1093 | | |
1099 | | - | |
1100 | | - | |
1101 | 1094 | | |
1102 | 1095 | | |
1103 | 1096 | | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | 1097 | | |
1117 | | - | |
| 1098 | + | |
1118 | 1099 | | |
1119 | 1100 | | |
1120 | 1101 | | |
1121 | | - | |
1122 | | - | |
| 1102 | + | |
| 1103 | + | |
1123 | 1104 | | |
1124 | 1105 | | |
1125 | 1106 | | |
| |||
1534 | 1515 | | |
1535 | 1516 | | |
1536 | 1517 | | |
1537 | | - | |
1538 | | - | |
| 1518 | + | |
| 1519 | + | |
1539 | 1520 | | |
1540 | 1521 | | |
1541 | 1522 | | |
| |||
1572 | 1553 | | |
1573 | 1554 | | |
1574 | 1555 | | |
1575 | | - | |
1576 | | - | |
1577 | | - | |
1578 | | - | |
1579 | | - | |
1580 | | - | |
1581 | | - | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
1582 | 1571 | | |
1583 | 1572 | | |
1584 | 1573 | | |
| |||
0 commit comments