Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
60da7090
Commit
60da7090
authored
Aug 22, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve performance of Rails backtrace cleaner configuration
Prefer Regexp#match?(String) over String#=~(Regexp).
parent
bb1405a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
changelogs/unreleased/pl-perf-backtrace-silencer.yml
changelogs/unreleased/pl-perf-backtrace-silencer.yml
+5
-0
config/initializers/backtrace_silencers.rb
config/initializers/backtrace_silencers.rb
+2
-2
No files found.
changelogs/unreleased/pl-perf-backtrace-silencer.yml
0 → 100644
View file @
60da7090
---
title
:
Improve performance of Rails backtrace cleaner configuration
merge_request
:
40182
author
:
type
:
performance
config/initializers/backtrace_silencers.rb
View file @
60da7090
...
...
@@ -2,7 +2,7 @@ Rails.backtrace_cleaner.remove_silencers!
# This allows us to see the proper caller of SQL calls in {development,test}.log
if
(
Rails
.
env
.
development?
||
Rails
.
env
.
test?
)
&&
Gitlab
.
ee?
Rails
.
backtrace_cleaner
.
add_silencer
{
|
line
|
line
=~
%r(^ee/lib/gitlab/database/load_balancing
)
}
Rails
.
backtrace_cleaner
.
add_silencer
{
|
line
|
%r(^ee/lib/gitlab/database/load_balancing)
.
match?
(
line
)
}
end
Rails
.
backtrace_cleaner
.
add_silencer
{
|
line
|
line
!~
Gitlab
::
APP_DIRS_PATTERN
}
Rails
.
backtrace_cleaner
.
add_silencer
{
|
line
|
!
Gitlab
::
APP_DIRS_PATTERN
.
match?
(
line
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment