[go: up one dir, main page]

Skip to content

Enable syntax highlighting cache when rendering MR diffs

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Background

When we render MR diffs in rapid diffs, we aren't using the highlight cache when we render diffs on all cases (e.g. rendering first N diffs or streaming).

Proposal

Since we're re-using same highlighting logic, we should also use the caching feature it includes (Gitlab::Diff::HighlightCache).

In diffs_batch.json approach, we call Diff::FileCollection::MergeRequestDiffBase#write_cache. We should be able to use that as well.

Edited by 🤖 GitLab Bot 🤖