es-tooling / esperf

A command-line utility for detecting and fixing performance problems
MIT License
5 stars 3 forks source link

Output one entry per replacement #10

Open 43081j opened 2 months ago

43081j commented 2 months ago

We currently output a log entry per file, per replacement.

For example, if you have foo.ts and bar.ts which both contain a bad module, you will see two logs.

Ideally, we make this more concise like so:

Module `blah` could be replaced by the following:

{some url}

In files:
- package.json
- foo.ts
- bar.ts

We should be careful when building this logic, though, as we need to avoid keeping a buffer of all files in memory.

We can't simply loop through all files/replacements and build a result set up, as that will take too much memory in large projects.