JetBrains / ForTea

Apache License 2.0
56 stars 10 forks source link

Optimize the include cache #26

Closed kirillgla closed 4 years ago

kirillgla commented 4 years ago

The cache (aka the include graph) used to only store paths to all of the included files. However, an extremely common operation is finding all the files that include a file, i.e. the reverse graph. The reverse graph used to be built every time it was required, which caused significant performance issues. This cache now stores and maintains both includers and includees.

Note: this PR only includes meaningful changes; the ones I did not deem meaningful can be found here