ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Rework coverage read and load to cache instead #106

Closed ryanluker closed 6 years ago

ryanluker commented 6 years ago

Currently everytime a file is opened, that has coverage to be displayed, the coverage file is read in and the coverage displayed. This is quite wasteful and can cause alot of cpu usage on large files (both lcov and source files).

Instead ideally there could be is a coverage object in memory that holds the current coverage from all lcov files and is updated independently. This updating should happen when: 1) there is a coverage file that has changed in one of the root folders 2) there is a new coverage file added 3) there is a coverage file removed

This change means that the coverage picker should go away and instead the system would automatically consume applicable files (info and xml). Instead of the picker an info box should be shown to the user describing the coverage locations found and that is it watching for changes to them.

The in memory coverage object should be the typescript type for the section in array form (or key valued based on file path potentially) https://github.com/ryanluker/vscode-coverage-gutters/blob/master/types/lcov-parse/index.d.ts#L40

There will be extensive technical rework needed to facilitate the change to reading from the cache when displaying coverage on an opened file.

ryanluker commented 6 years ago

Closing this issue as the work is broken out into this story #117