Skip to content

Prevent unnecessary Gitaly calls when rendering comment excerpts

What does this MR do?

Defers post-processing of Markdown to after we truncate the HTML

This should make post-processing a little bit faster and saves us some unnecessary Gitaly calls

Testing locally

  1. Create a comment that mentions yourself (so it creates a todo) and has a link to a repo file on the 2nd line.

    For example:

    @root Hello world!
    
    [Test](.gitignore)
  2. Open the todos page and you should see that the note rendered looks like: @root Hello world!...

    Before this MR, you can see in the performance bar that Gitaly calls are made even though there is no repo link here. With the changes in this MR, you should see that there are no more Gitaly calls.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

#39509 (closed)

Edited by Heinrich Lee Yu

Merge request reports