-
- Downloads
Speedup DiffNote#active? on discussions, preloading noteables and avoid...
Speedup DiffNote#active? on discussions, preloading noteables and avoid touching git repository to return diff_refs when possible - Preloading noteable we share the same noteable instance when more than one discussion refers to the same noteable. - Any other call to that object that is cached in that object will be for any discussion. - In those cases where merge_request_diff has all the sha stored to build a diff_refs get that diff_refs using directly those sha instead accessing to the git repository to first get the commits and later the sha.
Showing
- CHANGELOG 1 addition, 0 deletionsCHANGELOG
- app/controllers/projects/merge_requests_controller.rb 2 additions, 0 deletionsapp/controllers/projects/merge_requests_controller.rb
- app/helpers/notes_helper.rb 4 additions, 0 deletionsapp/helpers/notes_helper.rb
- app/models/diff_note.rb 10 additions, 2 deletionsapp/models/diff_note.rb
- app/models/discussion.rb 6 additions, 0 deletionsapp/models/discussion.rb
- app/models/merge_request.rb 14 additions, 1 deletionapp/models/merge_request.rb
- app/models/merge_request_diff.rb 4 additions, 0 deletionsapp/models/merge_request_diff.rb
- spec/models/diff_note_spec.rb 2 additions, 2 deletionsspec/models/diff_note_spec.rb
- spec/models/merge_request_spec.rb 24 additions, 0 deletionsspec/models/merge_request_spec.rb
Please register or sign in to comment