Skip to content

Commit

Permalink
Remove unnecessary call to Match.count (small perf improvement). (#217)
Browse files Browse the repository at this point in the history
* Remove unnecessary call to Match.count (small perf improvement).
Renamed an overload of MatchPattern to IsPatternMatch (ret bool).

* Remove unused extra TextContainer class

* Switch GetMatchingBoundaries to an IEnumerable

This is generally only used to call .Any() on so it is faster to do it this way than construct a list.

We don't need to check the size of the matches list, we can just iterate over it and if its 0 its a no-op.

* Rename MatchPattern EnumerateMatchingBoundaries

Co-authored-by: Michael Scovetta <miscovet@microsoft.com>
Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
  • Loading branch information
3 people authored May 26, 2020
1 parent fdc1f87 commit 95a3bfb
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 408 deletions.
317 changes: 0 additions & 317 deletions AppInspector.CLI/Writers/TextContainer.cs

This file was deleted.

Loading

0 comments on commit 95a3bfb

Please sign in to comment.