Skip to content

Speedup DiffNote#active? on discussions

Paco Guzman requested to merge 14202-speed-up-diff-note-active into master

What does this MR do?

Use same noteable instance for difference discussions (using AR preloader), cache active? call for each discussion because is executed in more than one place on the UI. Avoid accessing git repository to get diff_refs for MR that already has that data stored in the database.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Improve performance when loading MR with a lot of notes (DiffNotes)

What are the relevant issue numbers?

Relates with #14202 (moved) but more work to do (https://gitlab.com/gitlab-org/gitlab-ce/issues/14202#note_13491542).

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

Merge request reports