-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce memory allocated when rendering the index page #559
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ def initialize | |
def reset | ||
@root = Dir.pwd | ||
@root_paths = [] | ||
@ignore = IGNORE_DEFAULTS.dup | ||
@ignore = IGNORE_DEFAULTS.map { |ignore_str| Regexp.new(ignore_str) } | ||
@search_paths = TRACKED_DEFAULT_PATHS.dup | ||
@verbose = false | ||
@reporter = "scov" | ||
|
@@ -222,8 +222,8 @@ def search_paths=(path_array) | |
# Don't allow the ignore to override things like gem tracking | ||
### | ||
def ignore=(ignored_array) | ||
ignored_array.map { |ignore_str| Regexp.new(ignore_str) } | ||
@ignore = (@ignore + ignored_array).uniq | ||
ignored_array = ignored_array.map { |ignore_str| Regexp.new(ignore_str) } | ||
@ignore |= ignored_array | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so I think we want to assign here with a uniq... the purpose of this is that folks can add overrides to ignores... traditionally those have always been strings... so it is good to fix the bug, but I think we still need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ha you are correct, I just don't use the single |
||
rescue RegexpError | ||
logger.error "an invalid regular expression was passed in, ensure string are valid regex patterns #{ignored_array.join(",")}" | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here was an attempt to convert keys to regexps, but because of the bug, this line was a no-op.