Execute specific named route method from toggle_award_url helper method
What does this MR do?
Use specific named route method because this helper method is called a lot of times in pages with a lot of discussions.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
require 'benchmark/ips'
project = Project.find_with_namespace("gitlab-org/gitlab-ce")
project.namespace # Association load
namespace = project.namespace.becomes(Namespace)
note = project.notes.last
Benchmark.ips do |x|
x.report("current") do
app.url_for([:toggle_award_emoji, project.namespace.becomes(Namespace), project, note])
end
x.report("inter1") do
app.url_for([:toggle_award_emoji, namespace, project, note])
end
x.report("inter2") do
app.toggle_award_emoji_namespace_project_note_url(namespace, project, note)
end
x.report("new") do
app.toggle_award_emoji_namespace_project_note_url(namespace_id: project.namespace_id, project_id: project.id, id: note.id)
end
x.compare!
end
Calculating -------------------------------------
current 164.000 i/100ms
inter1 358.000 i/100ms
inter2 749.000 i/100ms
new 956.000 i/100ms
-------------------------------------------------
current 1.625k (± 8.1%) i/s - 8.200k
inter1 3.657k (± 6.3%) i/s - 18.258k
inter2 7.784k (± 8.3%) i/s - 38.948k
new 9.821k (± 9.3%) i/s - 48.756k
Comparison:
new: 9821.4 i/s
inter2: 7783.6 i/s - 1.26x slower
inter1: 3656.5 i/s - 2.69x slower
current: 1624.6 i/s - 6.05x slower
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Relates with #23241 (moved) and #23226 (moved)
Merge request reports
Activity
Added 9 commits:
-
5226caa6...6d48c489 - 8 commits from branch
master
- 461b9bd8 - Execute specific named route method from toggle_award_url helper method
-
5226caa6...6d48c489 - 8 commits from branch
Added 67 commits:
-
461b9bd8...9bb52e05 - 66 commits from branch
master
- 72e8c435 - Execute specific named route method from toggle_award_url helper method
-
461b9bd8...9bb52e05 - 66 commits from branch
Reassigned to @stanhu
Looks good to me! Assigning to @yorickpeterse for a final pass.
Reassigned to @yorickpeterse
Milestone changed to %8.13
- Resolved by Yorick Peterse
- Resolved by Paco Guzman
Reassigned to @pacoguzman
Added 151 commits:
-
72e8c435...602cac52 - 150 commits from branch
master
- 4adab57e - Execute specific named route method from toggle_award_url helper method
-
72e8c435...602cac52 - 150 commits from branch
Reassigned to @yorickpeterse
Reassigned to @pacoguzman
Added 90 commits:
-
4adab57e...5c9a54d6 - 89 commits from branch
master
- 0534a43d - Execute specific named route method from toggle_award_url helper method
-
4adab57e...5c9a54d6 - 89 commits from branch
Added 8 commits:
-
0534a43d...77507df6 - 7 commits from branch
master
- 6c7a6aa1 - Execute specific named route method from toggle_award_url helper method
-
0534a43d...77507df6 - 7 commits from branch
Added 59 commits:
-
6c7a6aa1...4e6af0c3 - 58 commits from branch
master
- 6a16697a - Execute specific named route method from toggle_award_url helper method
-
6c7a6aa1...4e6af0c3 - 58 commits from branch
@yorickpeterse finally passed the build after multiple rebases against master. The warning in the build is about merging this into ee, I've tried to follow the instructions but it will rebase rebase 326 commits (probably the difference between current gitlab-ce and gitlab-ee) I don't think that rake is correct, I've checked the files in both repositories and they have the same content so I think won't be a conflict on that merge into gitlab-ee
Reassigned to @yorickpeterse
Marked the task CHANGELOG entry added as completed
Marked the task Documentation created/updated as completed
Marked the task Conform by the merge request performance guides as completed
Marked the task Conform by the style guides as completed
Marked the task Conform by the merge request performance guides as incomplete
Marked the task Conform by the style guides as incomplete
Marked the task Conform by the merge request performance guides as completed
Marked the task Conform by the style guides as completed
Marked the task Squashed related commits together as completed
Marked the task Squashed related commits together as incomplete
Marked the task Conform by the merge request performance guides as incomplete
Marked the task Conform by the style guides as incomplete
Marked the task Conform by the merge request performance guides as completed
Mentioned in commit b1be3220
Mentioned in issue #23506 (closed)
Mentioned in merge request !6967 (merged)
Mentioned in merge request gitlab-com/www-gitlab-com!3412 (merged)