Skip to content

Commit

Permalink
Merge pull request #662 from BMorearty/performance-improvement
Browse files Browse the repository at this point in the history
Performance: memomize LinesClassifier::no_cov_line
  • Loading branch information
PragTob authored Mar 10, 2018
2 parents 9149925 + 93b82b2 commit 6250313
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ unreleased

* Relax version constraint on `docile`, per SemVer
* exception that occurred on exit is available as `exit_exception`! See [#639](https://github.com/colszowka/simplecov/pull/639) (thanks @thomas07vt)
* Performance: processing results now runs from 2.5x to 3.75x faster.

## Bugfixes

Expand Down
2 changes: 1 addition & 1 deletion lib/simplecov/lines_classifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class LinesClassifier
WHITESPACE_OR_COMMENT_LINE = Regexp.union(WHITESPACE_LINE, COMMENT_LINE)

def self.no_cov_line
/^(\s*)#(\s*)(\:#{SimpleCov.nocov_token}\:)/
@no_cov_line ||= /^(\s*)#(\s*)(\:#{SimpleCov.nocov_token}\:)/
end

def classify(lines)
Expand Down

0 comments on commit 6250313

Please sign in to comment.